CPB employees, please start at james.cpb.nl and contact the author if you run into bugs or if you want to make use of features that are not implemented yet. For questions about layout or help adapting your figures to the CPB-style, please contact the Communication Department. Please beware that browsers other than Chrome may not display this manual correctly.

1 A short introduction

This manual explains how to create customizable CPB-style figures with James from Excel and R. James’ goal is to tackle most of the CEP/MEV figures, which amounts mainly to customizable line and bar figures, scatter plots and fan charts - brightened up with some text labels. New:

1.1 What you need to know

On top of the information above, you need to know the following. The general workflow to create figures with James:

  1. Find the most recent .bat (or .sh) script in M:/p_james/release
  2. Copy it to the path where you want to create figures
  3. Start the bat (or sh) file by clicking on it. This will:
    • process all xlsx files it sees
      • each xlsx file should have a tab named meta
      • the meta tab lists parameters, one per row
      • parameter tab holds the name of the figure’s data tab
      • each column in the meta tab refers to a different figure
    • give you a copy of the manual
    • create a subdirectory generated/ with your figures
  4. Some settings are locked to guard homogeneity accross different figures. If needed you can remove the lock by setting lock= no. Please do so with great care.
  5. Although all examples below hold only one figure per xlsx-file, you can define multiple figures in one xlsx-file. Just add another column in the meta-tab for each new figure. You may also add a new data tab with data.
    • Please beware that two figures may refer to the same data tab, in which case they have the same value for parameter tab

Pro tip: if you want to process only specific xlsx-files, you can provide those files as argument of ‘james.bat’ (e.g., james.bat path/to/file1.xlsx other/path/to/file2.xlsx).

So, how to start now? This manual recommends to first get some experience by running through the subsection A kick-start example below. Next, you can skip through this manual and find a figure with a style you like. Below that figure you’ll read how to reproduce that figure. You can use that as a starting point and adapt it to your personal needs. Tip: use \(<\)Control\(>\)+F to quickly find terms in this manual.

1.2 A kick-start example

The following figure is a so-called ‘Hello World’ example. Directly below the figure you’ll find the instructions to reproduce it (in green).


Relevant parameters:

type line
title Hello World
x_title x
y_title y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The following two subsections explore and slightly adapt the Excel file (please find a download link for the Excel file below the figure).

1.2.1 On the meta-tab

Once you have a figure, it’s easy to change its layout. The previous figure transforms into the following figure after changing only three parameters. Parameter type = bar= indicates that we want bars instead of lines. The = in bar= indicates we want to have the bars stacked. Alternatively, you could choose bar-- to have them shown next to each other instead of stacked. Parameter turn = y turns the figure from portrait to landscape by putting the x-axis vertical and the y-axis horizontal. Parameters style = no-title obviously removes its title. Similarly, you can remove the legend with style = no-legend.


Relevant parameters:

style no-title
type bar=
x_title x
y_title y
turn y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

1.2.2 On the data in the data-tab

The first column of the data tab should contain the x-values. If the x-values are numeric, James will try to find elegant equidistant values to display. If the x-values contain a non-numeric character, James will display them ‘as is’. The data type of the first column may also be of type ‘date’ (please beware: this functionality has not been exhaustively tested and may thus lead to unanticipated results). The second and following columns contain the y-values of your variables (one variable per column), corresponding to the x-values in the first column. In cases where you want to ‘group’ x-values or y-variables, the exact data structure may slightly deviate from the above description; please see elsewhere in this manual for details.

Once you succeed to reproduce the above figure(s), you’re ready to learn more!

1.3 Use James in R

Next to plotting Excel data with James, you can also use James to plot your data in R. The caption below each figure in this manual explains how to reproduce that figure with James in R. Its first step is loading James:

source(M:/p_james/release/2022-06-18/R-header.R) (please check for a newer version)

Then, you can call James as follows:

  • nplot("url-to-cbs", ...); please see this section for details;
  • nplot("path/to/file.xlsx", ...);
  • nplot(m, ...), where m is matrix;
  • nplot(d, ...), where d is a dataframe;
  • nplot(z, ...), where z is a time series object and is.ts(z) or is.mts(z);
  • nplot(lst, ...), where lst is a list;
  • where the ... are meta-data parameters, which override parameters set in the xlsx-file and list elements.

The rest of this manual assumes that you use Excel to specify the meta data. Don’t forget to use quotes around the parameter values if you work from R. For example, if you want to create a pdf instead of a png: nplot("path/to/file.xlsx", pdf = 'y', png = 'n'). Remark: because parameters pdf and png are of type Boolean, you can also use pdf = TRUE and png = FALSE in R.

2 Basic figure types

The parameter called type specifies how the time series should appear in your figure. (Please do not confuse the parameter type with the type of a parameter’s values.) If you leave parameter type empty, it will default to type = line. If you specify only one value (e.g. type = bar--), James will use that value for each of the time series in your data. If want to mix different types, then you should specify the type for each of your time series. In which case the type’s n’th element corresponds to the n’th time series in your data. In particular, time series that are described with two columns of data (e.g. fan/bandwidth/area and whiskers), also need two values for parameter type.

Parameter type must have either zero values, one value, or n values. In case of zero values it defaults to line for all time series. In case of one value, this type will be used for all time series in your data. Otherwise, n should equal the number of time series columns in your data (i.e. all, exclusive the x-axis).

2.1 Line

Section ‘A kick-start example’ shows how to create a line figure with two series. The following figure is a more realistic example.


Relevant parameters:

type line
title Werkloosheid
y_title % beroepsbevolking
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Examples of figures with lines: Hello World, Hello World, Werkloosheid, Six different line types, Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe, Industriële productie en detailhandel, Two bandwiths in one plot, Oversterfte in 2020, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Geraamd vanaf 1958, Werkverliezers, Bestaande koopwoningen, A discontinuity, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, NA, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.

2.1.1 Line with discontinuity

A discontinuity works as follows. The data for the x-axis, in the first column of your xlsx-file, needs values everywhere. So, you should provide an x-value at the position where you want the discontinuity. You can leave the cell, which corresponds to the position of the discontinuity in the respective series, empty. Please look at the xlsx-file (link below figure) to see how that’s done here. This example also shows how to put multiple variants of the same series in the same plot.


You can take a look at the xlsx-file to see how this is done.

Relevant parameters:

type line
title A discontinuity
y_lim 0, 3
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.1.2 Dashed lines

Next to the default ‘solid’ line (i.e. line_lty= 1) there are five other line types you can choose from. The order of the values you give to a parameter corresponds to the order of the lines. So, the first value corresponds to the first line, the second value to the second line, etc.


Relevant parameters:

style y-right
type line
title Six different line types
y_lab 1; 2; 3; 4; 5; 6;
footnote Please use line_lty = 3 for CPB-figures
footnote_col rose
x_lim_follow_data y
line_lty 1, 2, 3, 4, 5, 6
y_r_lab ; 1; 2; 3; 4; 5; 6
x_axis_show n
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.1.2.1 Forecasting time series

You may have data that is partly observed and partly forecasted. In this case you can use parameter forecast_x to indicate where the forecast starts.


Relevant parameters:

title Bbp tijdens crises
x_title maand
y_title index
forecast_x 5
hline_bold 100
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

This manual describes forecasts in more detail in a separate section below.

2.1.2.2 Partly dashed line (one time series)

This paragraph explains how to compose a line that is solid at one end and dashed at the other end. Herefore, you need to create two separate time series; one for the solid line, and one for the dashed line. In addition you may want to do two other things as well. By default, James gives each next time series in the data sheet the colour that is next in the colour palette. So, firstly, you may want to give both parts of the same time series the same colour. Secondly, you may want to remove the second time series from the legend. The following figure shows how that is done in practice.


Relevant parameters:

title Partly dashed line
x_title maand
y_title index
line_lty 1, 3, 1
hline_bold 100
legend_order 1, 3
palette endeavour, endeavour, rose
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.1.3 Line with symbol (e.g. dot)

You can decorate your line with dots, diamonds or other symbols. This figure shows the available symbols. The symbols are superimposed at the data points you provide in your data tab. An example:


Relevant parameters:

type line
title Ontwikkeling EMU-schuld in schokscenario’s
y_title %-bbp
x_lim 2017.5, 2025.5
line_symbol 0, 20, 20, 20
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The following example adds a ‘brown’-colored diamond to the second time series. The diamond is automatically added to the legend too.


Relevant parameters:

type line
title Number of phones US vs. Europe
line_symbol 0, 18
line_symbol_col NA, brown
order 1, 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.1.4 Parameters to tweak your lines

You can use the following parameters to customize lines. Please beware that the order of the values you give to a parameter corresponds to the order of the lines; i.e., not necessarily to the order of the time series if some of them are not lines. So, the first value corresponds to the first line, the second value to the second line, etc.

  • line_lty: line type (1: continuous; 2, 3, … have dashes). For dashes the advice is to use 3. Please beware that the forecasted part of a line is automatically dashed, unless you specify this parameter. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed. For the default style the value is 1. See also parameter(s): line_obs_fc_lty. Figure(s) using ‘line_lty’: Six different line types, Partly dashed line, Two bandwiths in one plot, Oversterfte in 2020, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, trend-vs-niveau.
  • line_lty_correct_pdf_and_svg: auto-fix dashed lines in pdf and svg. The advice in *.gif/jpg/png is to use ‘line_lty = 3’ for dashed lines. In pdf/svg the intended dashes show up as small dots instead. This can be solved by replacing ‘line_lty = 3’ with ‘line_lty = 2’ for pdf/svg. The value is of type ‘bool’. For the default style the value is y.
  • line_lwd: time series line width. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1.5.
  • line_symbol: add a symbol to your line. This may be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, …, 23. For the default style the value is 0. See also parameter(s): dot_shape. Figure(s) using ‘line_symbol’: Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe.
  • line_symbol_col: color of the symbols that decorate your line. The colors default to the line color. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado, sun. Figure(s) using ‘line_symbol_col’: Number of phones US vs. Europe.
  • line_symbol_size: size of symbol. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1.

2.2 Bar

Bars can be next to each other (type = bar--) or stacked (type = bar=) or a combination of the two.

2.2.1 Bars next to each other

Parameter type = bar-- puts bars next to each other.


Relevant parameters:

type bar--
title Number of phones in the world
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

In this example there is no data given for years 1952 … 1955. Therefore, you see a ‘gap’ between the subsequent sets of bars. The figure, however, could suggest that there were no phones in those years. To circumvent this issue, you can consider to tell James that the values on the x-axis are ‘words’. James does not interpret their value then and just puts them equidistant on the x-axis – as can be seen in the following example.


Relevant parameters:

type bar--
title Number of phones in the world
x_lab_as_text y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

List of figures with bars next to each other: Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones in the world, NA, Europese steunpakketten, VWO, VWO, VWO, {x,y}lab{bold,italic}, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.

2.2.2 Bars stacked

Type bar= stacks bars.


Relevant parameters:

type bar=, bar--, bar--, bar=, bar--, bar--, bar=
title Number of phones in the world
x_lab_as_text y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Parameter bar_stack_index determines the positions of the stacks. By default they are shown at the right hand side. The figure below sets bar_stack_index = 1 and moves the stacks to the left. It also sets a name for the stack and adds it to the legend by with bar_stack_name = "The Americas".


Relevant parameters:

type bar=, bar--, bar--, bar=, bar--, bar--, bar=
title Number of phones in the world
bar_stack_name The Americas
bar_stack_index 1
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

List of figures with stacked bars: NA, Number of phones in the world, Number of phones in the world, Number of phones (Europe yellow), Forecasted from 1958, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA.

2.2.3 Dealing with many bars

The visualization of many bars in one figure may be a challenge. Opting for a wide figure (style = wide) obviously helps to create more space. In addition one can play with bar_gap_fraction, here set to 0.5 in the figure below so the size of the whitespace between the bars is balanced with the width of the bars. To ensure that the line is not submerged by the bars, the line is highlighted.

The author uses x_scale= 1000 because the x-values where given in thousands of euros and the author wants just euros on the x-axis. Putting x_lab_big_mark_show= y adds a thousands separator so large numbers are easier to read.

Relevant parameters:

style wide
type line, bar=, bar=, bar=, bar=, bar=, bar=, bar=
title Decompositie gemiddelde marginale belastingdruk werknemers 2021
x_title individueel bruto jaarinkomen (euro)
y_title %
highlight_series 1
bar_gap_fraction 0.5
x_scale 1000
x_lab_big_mark_show y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.2.4 Group data

One can group data points. Dependent on the orientation of the plot (turn = y or turn = n), the groups are shown in a different manner.

2.2.4.1 Vertical grouping

The following example shows how you can ‘manually’ group data points. Please note the zero that was added to the data (below the figure is a link to the xlsx-file). The zero creates space between the groups. In addition, y-axis, which is now the x-axis because turn = y starts at zero. If you don’t want this number (here: 0) to affect your axis, you can choose a value in between the range of the other values.


Relevant parameters:

type bar--
title VWO
y_title zakkans (%)
turn y
x_ticks 1, 2, 4, 5, 6, 8, 9, 10, 12, 13
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

In the xlsx-file you can add group names in a column preceding your data:


Relevant parameters:

type bar--
title VWO
y_title zakkans (%)
turn y
hline_bold 0
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.2.4.2 Horizontal grouping

For horizontal grouping, you can use parameter group_spacing if you want to add some extra space between the groups. This parameter also works for vertical grouping but may be less needed there.


Relevant parameters:

type bar--
title VWO
y_title zakkans (%)
hline_bold 0
legend_y 0.8
group_spacing 0.2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Another example of horizontal grouping is the following figure. The x_title is shifted lower with x_title_v_shift and used to add a kind of extra footnote refering to the title (using ¹). The legend is shifted higher with legend_y and put on one line with legend_n_per_column to make space for it. In addition x_lab_font_size scales the font size of labels at the x-axis somewhat smaller.


Relevant parameters:

type bar=
title Investeringen in Nederland¹ door de zwaarst-<backslash-n>getroffen eurolanden in 2018 en vice versa
x_title ¹Portfolio-obligaties en aandelen (< 5% totaal), en FDI in<backslash-n>eigen vermogen, incl. belastingconstructies als brievenbusfirma’s.
y_title mld euro’s
footnote Data: IMF, CDIS en CPIS | ESB
legend_n_per_column 1
legend_y 1.3
group_spacing 0.5
x_title_v_shift 1.6
x_lab_font_size 0.85
x_title_align left
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.2.4.3 Tweak groups

  • first_col_grouping: this parameter defines whether or not the first column in the data tab represents normal x-values (first_col_grouping = n) or whether it contains group names for the x-values (first_col_grouping = y). If you don’t set this parameter, James tries to guess the value of this parameter as follows. If the second column contains at least one character (i.e. a non-numeric value), first_col_grouping will be set to y automatically. Otherwise it is set to n automatically. You can overrule the automatic settings by setting this parameter by hand. This may happen if the values on the x-axis are numerical. The value is of type ‘bool’.
  • first_row_grouping: this parameter is for boxes only. See section box plot. It defines whether or not the first row in your data tab contains group names of your time series box plot. Boxes can be grouped, which gives the boxes in the same group the same ‘header’ (and the same color if you want to). You should put the group names in the first row, i.e. above the time series names. In most cases you don’t have to set this parameter manually as James will automatically set the value of parameter first_row_grouping = y if any of the time series comprises a character. If James erroneously puts group names above your boxes, you can manually overrule this by setting first_row_grouping = n. The value is of type ‘bool’.
  • group: names of groups. If given, number of elements should equal number of time series. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): group-1;; group-2;; group-2. See also parameter(s): first_row_grouping, box_col_per_group, name.
  • group_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  • group_font: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 2.
  • group_font_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  • group_spacing: extra space between groups. The value is of type ‘numeric’. Example(s): 0, 0.5, 1, 2. For the default style the value is 0. Figure(s) using ‘group_spacing’: VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  • group_x: the x-positions of the group names. James will set them automatically if not specified by user. Please beware that the group names should be placed at different positions, dependent on the orientation of your plot (i.e., turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
  • labels_margin_add_for_groups: minimal distance between group name and series name. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.
  • x_lab_group_v_shift: downshift of the group-labels below the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.5.

2.2.5 Highlight a specific series

In general, parameter highlight_series will give color highlight_col (default: rose) to that series. I.e., also for non-bar type figures.

The following figure, for example, highlights the second time series.


Relevant parameters:

type bar=
title Number of phones (Europe yellow)
highlight_series 2
highlight_col yellow
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

If you use this parameter to highlight a time series of type ‘bar’ (bar-- or bar=), you can choose to limit the highlighting to one bar in particular. The following figure shows how you can do so with parameter highlight_x.


Relevant parameters:

type bar--
title Europese steunpakketten
y_title % bbp
turn y
highlight_series 1
highlight_x 7
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.2.5.1 Tweak your highlighting

Please note that if the ‘highlight color’ is part of your palette, which the default highlight color is, it will be removed from the palette so that only the highlighted time series gets the wanted color.

These parameters enable you to highlight a certain time series or a certain bar of a certain time series.

2.2.6 Parameters to tweak your bar plot

  • bar_gap_fraction: how much space you want between the bars of two consecutive x-points, where 0 means no gap, 1 means no bars. The value is of type ‘numeric’. Unit: ‘fraction’. Example(s): 0, 0.1. For the default style the value is 0.2. Figure(s) using ‘bar_gap_fraction’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
  • bar_lab_big_mark_show: for the values in or above bars, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  • bar_lab_col: color of the labels. The value is of type ‘string’. For the default style the value is black.
  • bar_lab_font_size: leave empty for auto scaling. The value is of type ‘numeric’.
  • bar_lab_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 1.
  • bar_lab_n_decimals: the number of decimals the bar labels should get. The value is of type ‘numeric’. For the default style the value is 0.
  • bar_lab_rotation: rotate the barplot labels. Zero (0) for horizontal. 90 for vertical. Leave empty for default (i.e. horizontal for labels on top of the bars, vertical for labels inside the bars). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 90. For the default style the value is [not set].
  • bar_lab_show: you can show the value of the bar on top of it, or in its middle. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2. Figure(s) using ‘bar_lab_show’: kansrijk.
  • bar_lab_top: y means top, n means middle. The value is of type ‘bool’. For the default style the value is y.
  • bar_stack_index: the position where the stacked bars should appear if you also have bars next to each other. Default is at the right. The value is of type ‘numeric’. Figure(s) using ‘bar_stack_index’: Number of phones in the world.
  • bar_stack_name: name that explains what the sum of the stacked bars means. The value is of type ‘string’. Figure(s) using ‘bar_stack_name’: Number of phones in the world.

2.3 Scatter plot, adding symbols

This section shows how to add dots to your plot. The following parameters help to fine-tune the dots to your needs. Dots can have different shapes and sizes. Probably, ‘symbol’ would be a more appropriate name for this variable.

List of figures with dots: Phones per continent, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.

2.3.1 Scatter plot

The following figure has only a few dots so these dots can be big. You can use dot_size to downscale the dots or use dot_shape= . to get really small dots.

Example of a scatter plot:


Relevant parameters:

type dot
title Phones per continent
y_title number
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.3.2 Different shapes of the dot/symbol

The following figure shows the different symbols you can choose from.

As an alternative to the above 23 shapes, you can also use a dot (dot_shape = . or equivalently dot_shape = 46) and letters as symbol shape. Value . is handled specially. It is a rectangle of side 0.01 inch = 0.0254 cm (scaled by dot_size). In addition, if dot_size = 1 (the default), each side is at least one pixel (1/72 inch on the pdf).

2.4 Area/bandwidth/confidence interval

The two subsections below describe how to visualize your time series as an area, bandwidth and fan.

2.4.1 Stacked areas

Parameter type = area= stacks the time series in your plot as areas, starting at the x-axis; i.e. the y-axis includes y = 0 by default. Parameter area_stack_name enables you to label the stack in the legend. An example of which is shown in the following figure. Please note that by default the area_stack_name is placed last in the legend; i.e. at position 4. To achieve the same vertical order in the legend as in the figure and keeping the area_stack_name last, parameter legend_order = 3, 2, 1, 4.


Relevant parameters:

type area=
title NL’ers hebben buitenlandse obligaties
y_title mld euro
scale 100
x_lim_follow_data y
legend_order 3, 2, 1, 4
area_stack_name Totaal belangrijkste drie landen
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Time series of type area= may have negative values, in which case the area is placed below the x-axis. Please beware, a stacked area is currently not allowed to have both positive and negative values. In other words, a ‘stacked area’ can’t cross the x-axis.

List of figures with stacked areas: NL’ers hebben buitenlandse obligaties, Cohorten omvatten veel asielmigranten, Geraamd vanaf 1958.

2.4.2 Bandwidths

This subsection describes how you can plot an area without stacking it on another area. A non-stacked area has a bottom and a top. So, you’ll need two series of data to describe one area. These series you can mark with type = area, area, consecutively.

The following figure shows two lines with a confidence interval. The color palette is chosen so it’s clear to which line the interval belongs.


Relevant parameters:

type line, line, area, area
title Oversterfte in 2020
x_title week
y_title sterfgevallen per week
footnote Bron: cbs.nl/nl-nl/faq/corona/medisch/hoeveel-sterfgevallen-zijn-er-per-week
x_lim 0, 53
line_lty 1, 3
hline_bold 0
vline_dash 41
vline_dash_col rose
text_x 42
text_y 4200
text_pos 2
text_label 12 oktober
text_col rose
palette rose, endeavour, anakiwa
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

One figure can hold more than one bandwidths:


Relevant parameters:

type line, area, area, line, area, area
title Two bandwiths in one plot
line_lty 3, 3
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

2.4.3 Plot order of areas

The Section on ‘execution pipelines’ below explains in detail in which order James executes the different plotting steps that construct your figure. In general, areas are large and therefore plotted before other elements. The data sheet determines the plotting order of different areas in your figure. The idea is that series that are present first (i.e., more to the left in the sheet) are more important and therefore plotted as last. So, in case two areas show overlap, the ‘important’ area is plotted on top of the ‘less important’ area. Please note that if you change the order of the time series in the data sheet, then the order in the legend changes correspondingly.

The following figure shows how you can play with the order of the time series and the order of the legend. Here, the time series ‘aantal asielaanvragen en nareizigers’ is shown as ‘background’. Therefore, it is placed at the right side of the data sheet; you can use the link below the figure to download the xlsx-file and check the data sheet. This specific series, however, should appear first in the legend. Parameter [legend_order](#parameter_legend_order)) = 3, 1, 2 accomplishes this.


Relevant parameters:

type area, area, area, area, area=
title Cohorten omvatten veel asielmigranten
y_title aantal (x 1.000)
legend_order 3, 1, 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Please note that the two blue areas have vertical borders at their left and right side. Adding the x-value of the vertical boundary twice to the data set enables you to create vertical borders. For example for the left boundary: adding (x, y) = (1995, 0) and (x, y) = (1995, 21) does the job. The y-values of the other time series are just duplicated for those x-values. Please download the xlsx-file of the above figure and take a look at the data tab for a practical example.

2.4.4 Parameters to tweak your area plots

2.5 Whiskers

This section explains how to use whiskers in your figure.


Relevant parameters:

style no-legend
type dot, whisker, whisker
title Verwacht verlies in verschillende scenario’s
y_title Verlies (mld €)
turn y
dot_size 0.7
whisker_col endeavour
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Parameter whisker_series indicates to which series the whisker(s) belong. This is important for the following three reasons. First it determines the position of the whisker in the legend. Second for a bar plot this parameter is crucial for the x-position of the whiskers. In the following figure, whisker_series = 2 makes sure that the whisker is shown on top of the second time series (i.e. the right-hand bar). Third, in case of a plot that contains bars with whiskers, James will automatically limit the width of the whiskers to the width of the corresponding bars (manually adaptable by parameter whisker_edge_length), which prevents whiskers to overlap with each other.

The following is an example how multiple whiskers can be put in one plot. The author of the figure manually shifted the first series a little to the left and the second a little to the right. You can inspect the xlsx-file.

Relevant parameters:

style wide, english
type dot, dot, whisker, whisker, whisker, whisker
title Two series of whiskers in one plot
x_title year
y_title effect (a.u.)
footnote The whiskers of the two series don’t overlap because their x-values are adapted by hand.
x_lim 0.5, 15.5
dot_size 0.5
x_at 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
hline_dash 0
legend_order 1, 3, 2
whisker_col endeavour, rose
whisker_legend_col black
whisker_legend_show_n 1
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Whiskers in bar plots:


Relevant parameters:

type bar--, bar--, dot, whisker, whisker
title Verwacht verlies in verschillende scenario’s
y_title Verlies (mld €)
dot_size 0.7
legend_n_per_column 4
whisker_series 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Parameter whisker_legend_show_n determines the number of whiskers the legend shows - which you may want if different whiskers have different meanings.


Relevant parameters:

type bar--, bar--, whisker, whisker, whisker, whisker
title VMBO
y_title kans om te zakken (%)
footnote Please note: whiskers are different.
footnote_col rose
turn y
legend_n_per_column 2
whisker_legend_show_n 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

List of figures with whiskers: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.

2.5.1 Tweak your whiskers

  • whisker_col: color of whiskers. You can supply a different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘whisker_col’: Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
  • whisker_edge_length: not documented yet. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.0000000000000007E-2.
  • whisker_legend_col: color of whiskers in legend. If no value specified, whiskers will take same color as in figure. The value is of type ‘string’. Figure(s) using ‘whisker_legend_col’: Two series of whiskers in one plot.
  • whisker_legend_show_n: the number of whiskers you want to show in your legend. If different whiskers for different series have different meanings, you may want to show them all. If you don’t want to see whiskers in your legend, then set whisker_legend_show_n = 0. Please note that you can change the order of the whiskers in your data if needed. The value is of type ‘numeric’. Example(s): 0, 1, 2, …. For the default style the value is 1. Figure(s) using ‘whisker_legend_show_n’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Two series of whiskers in one plot.
  • whisker_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.5.
  • whisker_series: time series which this series corresponds to. The default value is set so that your first whisker definition is superimposed on the first time series (bar–), the second on the second, etc. If, for example, you have a whisker for only one of the time series, you can indicate here which time series that is. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Figure(s) using ‘whisker_series’: Verwacht verlies in verschillende scenario’s.

2.6 Combining the above types

You can combine different types in one plot. Parameter name_col colors the line black. Section ‘Colors’ discusses how to use this paramter.


Relevant parameters:

type bar=, bar=, bar=, bar=, bar=, line
title Groeibijdragen bestedingen
y_title %-punt bbp-groei
name_col bbp-groei=black
line_lty 3
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The figure below is another real world example that combines bars with dots dot_shape = 18. The ‘dots’ are highlighted with default color highlight_col = rose. If that color is part of your palette (which it is here!), it will be automatically removed from the palette so that only the highlighted time series gets the desired color.


Relevant parameters:

style x-top
type bar=, bar=, bar=, bar=, bar=, dot
title Verlies van banken na afschrijving 20% van de<backslash-n>overheidsschuld van GIIPS-landen
y_title % van EV
footnote Bron: EBA Transparency Exercise
scale 1, 1, 1, 1, 1, 100
turn y
y_axis r, r, r, r, r, l
y_r_title mld euro
highlight_series 6
dot_shape 18
y_at 0, 10, 20, 30, 40, 50, 60
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

3 Special figure types

This section lists figure types that are slightly more complex. Some of them need calculation (e.g. a histogram and a box plot) and others use a predefined combination of settings - making your life more easy.

3.1 Fan chart

A ‘fan chart’ is a special case of bandwidth plot. It always follows one and the same structure: one line, followed by three confidence intervals with fixed colors. Parameter style= fan initializes three parameters. Firstly, parameter palette for colors, secondly parameter type for the time series types conform the CPB style. I.e., first a rose line, followed by three blue intervals with increasing intensities. This figure shows the color palette. You can re-use these colors in the case you want to customize your fan chart. Thirdly, the four items in the legend are put in one and the same column (legend_n_per_column = 4).


Relevant parameters:

style fan
title Inflatie
y_title mutatie in %
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Parameter style = fan sets colors and types for standard fans with one line, followed by three bandwidths. Using this style entails the following settings. type: line, area, area, area, area, area, area, legend_n_per_column: 4, palette: fan. So, using styles saves the time and the effort to implement each setting manually.

3.2 Purchasing power plots

You can use style= ppower to produce standardized purchasing power plots. An example:


Relevant parameters:

style ppower
y_at -50, -40, -30, -20, -10, 0, 10, 20, 30, 40, 50
x_keep 0, 140
y_keep -50, 50
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Please be careful and take a look at the settings resulting from the ppower style:

  • type: dot, line, line, line, title: Koopkrachtontwikkeling, x_title: bruto huishoudinkomen (dzd euro), y_title: verandering koopkracht (%), dot_shape: ., x_scale: 1E-3, scale: 100, legend_n_per_column: 4, hline_bold: 0, palette: ppower

These settings include a scaling of both the x- and the y-axis automatically.

3.3 Histogram

This section shows how you can use James to create a basic histogram of one single vector of data with parameter style = histogram. You can use the following parameters to tweak your histogram.

  • hist_breaks: number of cells (bars) you want in the histogram. If you leave this empty, James will do an educated guess. The value is of type ‘numeric’. Example(s): 10.
  • hist_freq: if y, the histogram graphic is a representation of frequencies (i.e. counts). If n, probability densities are plotted so that the histogram has a total area of one if you set bar_gap_fraction = 0. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): bar_gap_fraction.

An example of a histogram:


Relevant parameters:

style histogram, no-legend
title Standard normal distribution
y_title Number of observations (a.u.)
footnote mu = 0, sigma = 1
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

If you want to enrich your histogram with other time series, you should consider the histogram as a special case of a bar plot and manually add its x- and y-values to the data tab. Doing so enables to add other time series to your plot as well.

3.4 Box plot

The default box plot in James shows quantities box_quantiles = 0, 0.25, 0.5, 0.75, 1. You can create a box-plot with style = box-plot. The line in the figure below runs from min to max. The box runs from the 25% - 75% quantile (second and fourth value of the parameter box_quantiles). The second figure below shows how you may remove the box from the figure by making the second and fourth quantile equal to the third value. The third value of box_quantiles by default indicates the 50% quantile.

This style entails the following settings. style: no-legend, y_title_v_shift: 0.3 cm, box_gap_fraction: 0.5, box_median_lab_show: y, margin_north: 0.95 cm. Please note that the use of style = no-legend in the ‘Relevant parameters’ below is redundant and can be omitted. Style no-legend is already included in style box-plot.


Relevant parameters:

style box-plot, no-legend, tall
type box
title Inkomenseffecten plannen<backslash-n>socialezekerheids- en belastingstelsel
y_title verandering in 2025 (%)
turn y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The following figure is an example how to adjust the box plot. This figure removes the box by adjusting the box_quantiles as explained above. Please note, this figure does not use style = box-plot (see previous paragraph for details on this style). If we want to show the median labels, we have to explicitely indicate that by box_median_lab_show= y.

Relevant parameters:

style no-legend, wide
type box
title Kans om in risicogroep te zitten
x_title kenmerk
y_title toename in de kans om geraakt te worden t.o.v. het gemiddelde
turn y
box_col_all_equal y
box_quantiles 0.025, 0.5, 0.5, 0.5, 0.975
box_median_shape 19
box_median_col rose
hline_dash 0
box_median_lab_show y
box_median_lab_n_decimals 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

List of box-plot figures: Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten.

3.4.1 Tweak your box plot

  • box_col_all_equal: if y, all boxes get the same color. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘box_col_all_equal’: Kans om in risicogroep te zitten.
  • box_col_per_group: usually you want one color per group (y). But you may choose to give each box its own color. The value is of type ‘bool’. For the default style the value is y.
  • box_gap_fraction: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.2. For the box-plot style the value is 0.5.
  • box_lab_big_mark_show: for the values (e.g. median) in box plots, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  • box_median_col: if empty, same color as box. The value is of type ‘string’. Example(s): gray30. Figure(s) using ‘box_median_col’: Kans om in risicogroep te zitten.
  • box_median_lab_font_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.7.
  • box_median_lab_n_decimals: not documented yet. The value is of type ‘numeric’. For the default style the value is 2. Figure(s) using ‘box_median_lab_n_decimals’: Kans om in risicogroep te zitten.
  • box_median_lab_show: not documented yet. The value is of type ‘bool’. For the default style the value is n. For the box-plot style the value is y. Figure(s) using ‘box_median_lab_show’: Kans om in risicogroep te zitten.
  • box_median_line_extension_factor: put at zero to make length equal to box_width. The value is of type ‘numeric’. Unit: ‘fraction of box_width’. For the default style the value is 0.2.
  • box_median_shape: 0 = line, rest is symbols like in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the value is 0. Figure(s) using ‘box_median_shape’: Kans om in risicogroep te zitten.
  • box_median_shape_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.5.
  • box_name_as_x_lab: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  • box_quantiles: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0, .25, .5, .75, 1. Figure(s) using ‘box_quantiles’: Kans om in risicogroep te zitten.
  • box_x: boxes are shown above this x-position. Leave empty for defaults. The value is a list with elements of the type ‘numeric’ separated by ‘,’.

3.5 Geographic maps

James supports maps on two scales: The Netherlands and the world.

3.5.1 The Netherlands

With style = map you can create a map of The Netherlands. Doing so entails the following settings. legend_y: 1.08 cm, margin_south: 1.5 cm, margin_west: 0.5 cm, margin_north: 0.8 cm, margin_east: 0.5 cm, palette: palette_map.

3.5.1.1 Colored regions

This section explains how to create a figure with a geographic map of different regions, each with a given color. A color may be either given directly or be interpolated based on a given value.

The following box provides an overview of the type of regions of The Netherlands you can choose from:

Regions you can choose from. [Please beware that you should append a year to the following regions (e.g. arbeidsmarktregio_2020)!] Arbeidsmarktregio, Arrondissementsgebied, Brandweerregio, Buurt, COROP-gebied, COROP-plusgebied, COROP-subgebied, Gemeente, GGD-regio, Grootstedelijke aglomeratie, Jeugdregio, Kamer van Koophandelregio, Landbouwgebied, Landbouwgroep, Landsdeel, NUTS1, NUTS2, NUTS3, Politieregio, Provincie, Regionaalmeld Coordinatiepunt, Regionale Eenheid, RES-regios, Ressort, RPA-gebied, Stadsgewest, Toeristengebied, Toeristengroep, Veiligheidsregio, Veiligthuisregio, Wijk, Zorgkantoorregio.

These items are available for different years. The maps are downloaded on the fly. CBS explains here and here how to work with PDOK maps in R.

The following subsections explain step by step how to start creating your own custom geographic map.

3.5.1.2 Step 1: choose a map

You start with selecting a specifc map from Appendix: CBS Geo-regions and assign that value to parameter geo_cbs_map. Next, with parameter style you indicate that you want to create a map. As last, you set parameter tab to a non-existing data tab. For example, your meta-tab could look as follows.

Parameter Value
tab data
style map
geo_cbs_map arbeidsmarktregio_2020

Doing so will result in a map that divides The Netherlands in so-called arbeidsmarktregio’s in the year 2020.

3.5.1.3 Step 2: save file and create figure

After saving your file, you can run James for the first time. If the tab you refer to does not exist yet (important!), James will create a new tab with the given name, fill it with data (see next step) and create the following figure.


Relevant parameters:

style map
geo_cbs_map arbeidsmarktregio_2020
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

3.5.1.4 Step 3: initialisation of the data tab (re-open xlsx-file)

After running James, you can find the freshly created data tab after closing and re-opening your xlsx file. In the data tab, you’ll find four columns:

  • region with the region names for the chosen geo_cbs_map
    • you can manually remove regions if you prefer to use codes
  • code with the corresponding region codes
    • codes are stable identifiers for regions
    • James prefers to work with codes and uses region names only if you remove the codes column
  • value with a unique integer for each region
    • you can remove the values or update them later, according to which the regions will be colored
    • the subsection below will explain how you can ‘hardcode’ a color for a given region
  • label with numbers 1, 2, … as an example label for each region
    • you can remove or update the labels later

To be complete, there is one more column which you can add too (not yet present):

  • color so you can ‘manually’ set colors
    • the xlsx-file of the next figure uses a color column to give color sun to region Zeeland
    • you can open the respective xlsx-file to see how this is done

3.5.1.5 Step 4: customizing your figure

The figure below equals the figure above, after the following modifications.

  1. Remove the first region (Groningen)
    • the figure below does not show Groningen anymore
  2. Remove the value of region Friesland
    • the figure still shows the region even though its color is transparent now
  3. The label of the region Friesland was updated to ‘(leeg)’
  4. The palette holds one color more (+rose)
  5. Add parameter geo_col_threshold with values for the colors in the palette (1 = anakiwa, 18.5 = endeavour, 36 = rose); Section ‘Colors’ explains the use of colors in detail
  6. Add parameters name and name_col to specify the legend; Section ‘Legend’ explains in detail how you can further tweak or remove the legend
  7. Finally add a footnote and a title


Relevant parameters:

style map
title Arbeidsmarktregio’s in 2020 volgens CBS
footnote Nederland bestaat in 2020 uit 36 arbeidsmarktregio’s
name_col special region = sun
geo_cbs_map arbeidsmarktregio_2020
name lowest value (1);; middle value (18.5);; highest value (36);; special region
geo_col_threshold 1, 18.5, 36
palette anakiwa, endeavour, rose
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Next to region names, it’s also possible and probably preferable to make use of codes to identify regions. The following figure does so. The head of its data tab lists:

code value
GM1680 1
GM0738 1
GM0358 0
GM0197 1
GM0059 1
GM0482 1


Relevant parameters:

style map
title Participatie gemeenten
footnote Jaar 2018
geo_cbs_map gemeente_2018
name niet;; wel
legend_order 2, 1
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

3.5.1.6 Parameters to further tweak your map

The Netherlands is divided in several ways in different regions. You can use these parameters to choose which devision you want to use. You may add items to the legend with parameter name. The items in the legend will be colored in the same order as the colors in your palette. See also parameter(s): name, palette.

  • geo_border_col: not documented yet. The value is of type ‘string’. Example(s): black. For the default style the value is gray.
  • geo_border_lwd: not documented yet. The value is of type ‘numeric’. Example(s): 1. For the default style the value is 0.5.
  • geo_cbs_available_maps: not documented yet. The value is of type ‘path’. For the default style the value is ext/geo/cbs-maps.RData.
  • geo_cbs_map: this parameter specifies a specific division of The Netherlands in regions. See appendix of manual for the full list of options currently available. The value is of type ‘string’. Example(s): arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’: geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
  • geo_cbs_url_base: first part of url that is used to download geographic data originating from CBS. Please edit the url if you need to. The value is of type ‘string’. For the default style the value is https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
  • geo_cbs_url_centroid: part of url that is pasted after the region name (for centroids so labels can be placed). The value is of type ‘string’. For the default style the value is _labelpoint.
  • geo_cbs_url_polygon: part of url that is pasted after the region name (for polygons). The value is of type ‘string’. For the default style the value is _gegeneraliseerd.
  • geo_col_threshold: the order of the values of this parameter correspond to the order of the colors in your palette. Regions with the first (second, third, etc.) value will get the first (second, third, etc.) color from your palette. Regions with other values will be be colored by linear interpolation of the colors in your palette. Regions with values outside the range of this parameter will get the figure’s background color. The values in this parameter must be stricktly increasing. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using ‘geo_col_threshold’: Arbeidsmarktregio’s in 2020 volgens CBS.
  • region_label_col: not documented yet. The value is of type ‘string’. Example(s): white. For the default style the value is black.
  • region_label_font_size: relative font size. The value is of type ‘numeric’. Example(s): 0.7, 1.5. For the default style the value is 1.
  • region_label_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.

3.5.2 The world

The following figure uses style = world-map to show a map of the world with CPB-style colors, added green. This style entails the following settings. style: wide, width: 15.5 cm, height: 8.5 cm, margin_south: 0 cm, margin_west: 0 cm, margin_north: 0.5 cm, margin_east: 0 cm, palette: palette_world_map, world_map_projection: +proj=hatano, world_map_country_border_col: white, world_map_country_border_lwd: 1, world_map_country_no_data_col: gray95, world_map_ocean_col: anakiwa, world_map_ocean_border_col: anakiwa, world_map_threshold: -2.0, -1.5, 0, +1.5, +2.0, world_map_threshold_legend_n_decimals: 1, world_map_legend_font_col: endeavour, world_map_legend_font_size: 1.3, world_map_title_bg_col: endeavour, world_map_title_col: white, world_map_title_font_size: 2.1, world_map_value_n_decimals: 1, world_map_value_symbol: %, world_map_value_font_size: 3, world_map_value_col: white, world_map_legend_dot_size: 0.5, world_map_legend_dot_col: anakiwa.

Relevant parameters:

style world-map, wide, english
title World import, customs or balance of payments (prices), change in july, 2020.
footnote Source: cpb.nl/en/cpb-world-trade-monitor-july-2020
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Because the figure is in English, it uses style = english too.

Please note that the use of style = wide in the ‘Relevant parameters’ above is redundant and can be omitted. The use of style = world-map already includes style = wide. The same remark is valid for all ‘world figures’ below.

3.5.2.1 Country abbreviations

You can specify the countries following the ISO 3166-1 standard for either alpha-2 two letter country codes, or alpha-3 three letter country codes. James is not case sensitive here, so you can use both uppercase and lowercase.

The above figure uses the alpha-2 standard, in which, for example, The Netherlands is represented with ‘NL’. This alpha-2 standard is used most prominently for the Internet’s country code top-level domains (with a few exceptions). The alpha-3 standard on the other hand represents The Netherlands with ‘NLD’.

Currently, James uses the R-package rnaturalearth to represent the world. Unfortunately, this package does not exactly follow the above standards for the following countries: Kosovo (KOS), Palestine (PSX), Somaliland (SOL), South Sudan (SDS), Turkish Republic of Northern Cyprus (CYN) and Western Sahara (SAH). If you need these countries, please use the alpha-3 standard plus the abbreviations shown here.

3.5.2.2 Fancy layout

If you want a more fancy layout of the title, you can use style = world-map-www.

Relevant parameters:

style world-map-www, world-map, wide, english
title World trade volume change last month
footnote Source: cpb.nl/en/worldtrademonitor
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

This layout also enables you to set a value for the title (parameter world_map_value). The value appears at the right size of the title with the blue background. The background color of the value is automatically adapted based on the thresholds (world_map_threshold) and colors set in the legend. Please note that the palette parameter sets the corresponding colors (parameter palette_world_map holds the default colors). The horizontal size of the blue background of the title scales with its content.

Relevant parameters:

style world-map-www, world-map, wide, english
title World trade volume change last month:
footnote Source: cpb.nl/en/worldtrademonitor
world_map_value 3.3
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

3.5.2.3 Parameters to tweak your world map

  • world_map_country_border_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  • world_map_country_border_lwd: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  • world_map_country_no_data_col: not documented yet. The value is of type ‘string’. For the world-map style the value is gray95.
  • world_map_legend_dot_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  • world_map_legend_dot_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 0.5.
  • world_map_legend_font_col: not documented yet. The value is of type ‘string’. For the world-map style the value is endeavour.
  • world_map_legend_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.3.
  • world_map_ocean_border_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  • world_map_ocean_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  • world_map_projection: maps are flat (2D), while the earth is a sphere (3D). Here you can choose which projection you want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html contains an overview. Please use the ‘proj-string’ below the image. See for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The value is of type ‘string’. For the world-map style the value is +proj=hatano.
  • world_map_threshold: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the world-map style the value is -2.0, -1.5, 0, +1.5, +2.0.
  • world_map_threshold_legend_n_decimals: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  • world_map_title_bg_col: not documented yet. The value is of type ‘string’. For the world-map style the value is endeavour.
  • world_map_title_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  • world_map_title_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 2.1.
  • world_map_value: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘world_map_value’: World trade volume change last month:.
  • world_map_value_bg_col: not documented yet. The value is of type ‘string’.
  • world_map_value_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  • world_map_value_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 3.
  • world_map_value_n_decimals: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  • world_map_value_symbol: not documented yet. The value is of type ‘string’. For the world-map style the value is %.

4 Forecasts, prognoses, predictions

Time series often have a known part (usually in the past) and a predicted part (e.g. in the future). You can use parameter forecast_x to indicate from which point on your data is predicted. Parameter forecast_x is defined as the time point (read: x-value) that is separates the observed past from the forecasted future. Values larger than forecast_x are considered to be forecasted. The area of the figure that corresponds to the forecast is marked with a white rectangle containing the text ‘raming’ by default or ‘prognosis’ if style = english.

4.1 An example with bars and a line

If your figure has bars, however, the true value of forecast_x may coincide with a bar or with a stack of bars. In that case you may want to tweak the value of forecast_x so the white rectangle starts left of the bar. The following figure illustrates this.


Relevant parameters:

style english
type line, bar=, bar=, bar=, bar=, bar=, bar=
title Forecasted from 1958
footnote For aesthetical reasons and not cutting bars, we use forecast_x = 1957.5
logo y
forecast_x 1957.5
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

4.2 An example with stacked areas

The following figure uses the data of the previous figure. The stacked bars (bar=), are replaced with stacked areas (area=). Forecasted (stacked) areas are marked with white diagonal lines. Further there are two differences. Firstly, because the figure does not contain bars, the forecast can start at exactly the desired position (i.e. 1958). Secondly, by removing style = english, the languages is changed to Dutch. This has an effect on the logo, on the text marking the forecast (now: raming) and on thousands separator at the y-axis.


Relevant parameters:

type line, area=, area=, area=, area=, area=, area=
title Geraamd vanaf 1958
x_lim_follow_data y
logo y
forecast_x 1958
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

4.3 Parameters to tweak your forecast layout

  • forecast_below_gridline: text above or below upper gridline. The value is of type ‘bool’. For the default style the value is y.
  • forecast_bg_col: background color for forecasting. The value is of type ‘string’. For the default style the value is #ffffff.
  • forecast_bg_show: show background color behind forecasted part of series. The value is of type ‘bool’. For the default style the value is y.
  • forecast_col_transparency: forecasted areas/bars have this transparency level. Zero means no transparancy, one means full transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW ‘shade’ BARS/AREAS The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.7. For the default style the value is 0.
  • forecast_font_size: size of forecast_text. The value is of type ‘numeric’. For the default style the value is 0.9.
  • forecast_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  • forecast_shading_angle: slope of shading lines, given as an angle (counter-clockwise). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90, 135. For the default style the value is 45.
  • forecast_shading_col: color of forecast shading. Default color is background color of the figure. The value is of type ‘string’. For the default style the value is bg_col.
  • forecast_shading_col_transparency: transparency of shading. The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.65. For the default style the value is 0.65.
  • forecast_shading_density: density of shading of areas and bars that are forecasted. The value is of type ‘numeric’. Unit: ‘cm^-1’. Example(s): 5, 10, 20. For the default style the value is 10.
  • forecast_shading_show: by default shading is added to forecasted bars/areas. The value is of type ‘bool’. For the default style the value is n.
  • forecast_text: text that marks the start of the forecast. The value is of type ‘string’. For the default style the value is raming. For the english style the value is prognosis.
  • forecast_text_col: color of the forecast_text. The value is of type ‘string’. For the default style the value is brown.
  • forecast_text_show: add text at top of plot (or right side for turned plots) to mark start of forecast. The value is of type ‘bool’. For the default style the value is y.
  • forecast_x: the x-value (usually a date) that separates observed values from predicted values. The value is of type ‘numeric’. Figure(s) using ‘forecast_x’: Bbp tijdens crises, Forecasted from 1958, Geraamd vanaf 1958.
  • line_obs_fc_lty: line types of observed respectively forecasted data. Please use the default settings. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1, 1. See also parameter(s): line_lty.

5 Figure layout

James has a parameter style, which enables you to quickly change the layout of your figure. Each style defines a unique combination of settings. Some styles you can combine (not all, because some contradict each other, e.g. the dimension styles).

5.1 Adjust figure width and height

The default dimensions of a figure are width 7.5 cm by height 7.5 cm. You can change this by setting the style parameter with one of the following values. James will automatically adjust all internal figure margins accordingly.

  • style = small for a slightly smaller figure. This is the standard for figures in a so-called ‘frame’ (Dutch: ‘kader’).
    • This style entails the following settings. width: 6.8 cm, height: 6.8 cm
  • style = big for figures with a lot of information (e.g. a barplot with many bars and labels on top of them).
    • This style entails the following settings. width: 15 cm, height: 15 cm
  • style = tall for figures that need extra vertical space in your text document.
    • This style entails the following settings. height: 15.5 cm
  • style = slide to fit the dimensions of a PowerPoint slide that has two figures on it.
    • This style entails the following settings. width: 14.2 cm, height: 11.7 cm
  • style = slide-wide to fit as a landscape image on a PowerPoint slide.
    • This style entails the following settings. width: 21 cm, height: 11.7 cm, margin_south: 2.8 cm
  • style = wide for figures that need extra horizontal space in a text document.
    • This style entails the following settings. width: 15.5 cm

It does not make sense to combine these.

5.2 Margins for legend and title styles

  • style = no-legend if you want to use the (legend) space below the plot for the plot too. The advantage of this style is that it does not affect the dimensions of your plot. If you don’t want to extend the plotting region (e.g. to be consistent with other plots), but don’t want a legend, please use legend_show = n.
    • This style entails the following settings. x_ticks_length: -0.02, legend_show: n, margin_south: 1.25 cm
  • style = no-title if you want a title and want to extend your plot to the (title) space.
    • This style entails the following settings. margin_north: 0.7 cm

5.3 Set dimensions to a custom value

The above two subsections explain how the figure’s size, dimensions and margins can be configured by setting just the style parameter at one single value. In almost all cases the corresponding changes of margins and shifts of elements should result in a nice layout. However, in some special cases you may want to have more grip on the precise values. In those cases you can take a look at the following parameters. Still, the style parameter should do most of the job and the following parameters should be considered for finetuning only.

  • height: height of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 7. For the big style the value is 15. For the slide style the value is 11.7. For the slide-wide style the value is 11.7. For the tall style the value is 15.5. For the world-map style the value is 8.5. For the world-map-www style the value is 9.
  • labels_margin_left: margin left of title, y_title, y_lab. Same margin is used at right side of main title if it is automatically rescaled if it grows to wide. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.45.
  • labels_margin_right: margin right of x_title. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.45.
  • margin_east: margin right of plotting area. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.635. For the map style the value is 0.5. For the world-map style the value is 0. For the world-map-www style the value is 0.
  • margin_east_extra: extra margin for right y-axis. The value is of type ‘numeric’. Unit: ‘cm’.
  • margin_north: margin above plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.524. For the default style the value is 1.3. For the box-plot style the value is 0.95. For the map style the value is 0.8. For the world-map style the value is 0.5. For the world-map-www style the value is 1. For the no-title style the value is 0.7.
  • margin_north_extra: not documented yet. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0. For the x-top style the value is 0.2.
  • margin_south: margin below plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.905. For the default style the value is 2.3. For the slide-wide style the value is 2.8. For the map style the value is 1.5. For the world-map style the value is 0. For the world-map-www style the value is 0. For the no-legend style the value is 1.25. For the interactive style the value is 3.
  • margin_west: set automatically for most styles. Sum of maximum width of your labels, plus margin_west_delta. The value is of type ‘numeric’. Unit: ‘cm’. For the map style the value is 0.5. For the world-map style the value is 0. For the world-map-www style the value is 0.
  • margin_west_delta: this is added to margin_west. margin_west is dynamically calculated based on actual width of your y_lab‘s, the labels_margin_left and y_lab_margin_right. This is to guarantee identical alignment of all your labels at the left side of the plot. The value is of type ’numeric’. Unit: ‘fraction of width’. For the default style the value is 0. For the interactive style the value is -0.04.
  • width: width of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 12.5. For the big style the value is 15. For the slide style the value is 14.2. For the slide-wide style the value is 21. For the wide style the value is 15.5. For the world-map style the value is 15.5.
  • y_lab_margin_right: margin between y_lab and plotting area. The value is of type ‘numeric’. Unit: ‘fraction of width’. For the default style the value is 1.4999999999999999E-2.

5.4 Turn your figure

Parameter turn with value turn = y (or turn = TRUE) swaps the x- and y-axes of your plot:


Relevant parameters:

type bar=, bar=, bar=, bar=, bar=, line
title Groeibijdragen bestedingen
y_title %-punt bbp-groei
turn y
name_col bbp-groei=black
line_lty 3
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

5.5 An example of a Kansrijk figure

Kansrijk figures don’t have a title, are wider, have a white background and use a different color palette for the time series. Parameter style = kansrijk will apply the Kansrijk style to your figure, which entails the following settings.

  • style: no-title, width: 12.5 cm, height: 7 cm, bg_col: #ffffff, palette: kansrijk

An example figure in the Kanskrijk style:

Relevant parameters:

style kansrijk, no-title
type bar--
y_title %
scale 100
turn y
bar_lab_show y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

This manual contains a section specifically on bar-plots that explains in detail how you can create your own custom bar-plot.

6 Figure elements

This section discusses specific figure elements which should enable you to create most of the figures.

6.1 Title

Obviously, you can set the title of your figure with the parameter title. If your title is too broad for your figure, you may add a newline with \n to your title. If your figure is (still) too broad, James will autoscale it smaller to make it fit the margins. Please beware, if this happens, your plot doesn’t comply anymore with the CPB-style.

If you don’t want a title, you can set style = no-title. Same for the legend. The following figure has no title and no legend.


Relevant parameters:

style no-title
type line
title Industriële productie en detailhandel
y_title geïndexeerd (2015=100)
x_lim_follow_data y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Because a title is specfied in the above case, James will give you a trivial warning:

## WARNING ## While your style includes 'no-title', you have specified a title. This seems contradictionary.

6.2 Footnote

You may add extra information, e.g. the source, to the figure by inserting a footnote. By default, the footnote is italic black, aligned bottom right. The following figure shows a footnote that is more prominent but visually less attractive.


Relevant parameters:

title Toeslagen
x_title bruto huishoudinkomen (euro)
y_title jaarbedrag (euro)
footnote Bron: Koot en Gielen (2019), op basis van MIMOSI
footnote_col rose
footnote_side top
footnote_align center
footnote_font_style 1
x_lab_big_mark_show y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

A footnote may refer to a text label (e.g. title) in your figure. In that case, you may want to use a ¹, ², ³, or * in both the text label and the footnote.

6.3 Axes

By default James produces axes with nice values and a suitable number of digits. This section explains how to tweak your axes.

6.3.1 Changing axis range in three ways

Parameter x_lim_follow_data= y zooms in on the x-axis and gets rid of the margins left and right of your graph (at the cost of nice labels on the x-axis).


Relevant parameters:

title Groeibijdragen bestedingen
y_title %-punt bbp-groei
footnote x_lim_follow_data = y
x_lim_follow_data y
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

With parameter x_lim you can set the range of the x-axis by hand. This may however lead to undesired results. The following figure illustrates what may happen.


Relevant parameters:

title Groeibijdragen bestedingen
y_title %-punt bbp-groei
footnote x_lim = 2010, 2014
x_lim 2010, 2014
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

You may observe two issues. First, the data shows up in the left and right margin of the figure because James plots the series outside the range of your x-axis. Second, the zoom on the y-axis is unnaturally small.

You may prevent these issues in two ways. You can manually remove the data outside the scope from your data tab. The most easy way, however, is to let James remove the data for you. You can do so by setting parameter x_keep to the range that should be kept.


Relevant parameters:

title Groeibijdragen bestedingen
y_title %-punt bbp-groei
footnote x_keep = 2010, 2014
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.3.2 Axis ticks

Time series are often have dates on the x-axis. With parameter x_ticks_date you can easily set ticks of a different length.


Relevant parameters:

title Groeibijdragen bestedingen
y_title %-punt bbp-groei
footnote x_ticks_date = years, quarters
x_ticks_date years, quarters
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.3.3 Typographical emphasis

By default the labels on your axes don’t get emphasis. You can however emphasize specific labels by making them bold and/or italic. The following figure has text labels at both axes, withouth empasis, in bold, in italic and in italic-bold, respectively. Parameter x_lab_bold, for example, indicates the indices of the bold labels at the x-axis. Please note that the labels are numbered 1, 2, 3, and so on. Likewise you can use x_lab_italic to make labels italic. Comparable paramters exist for the y-axis. For the axis at the top (style = x-top) and at the right side (style = y-right), text labels can’t be emphasized in the current version.


Relevant parameters:

style no-legend
type bar--
title {x,y}lab{bold,italic}
y_at 1, 2, 3, 4
x_lab_bold 2, 4
x_lab_italic 3, 4
y_lab_bold 2, 4
y_lab_italic 3, 4
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

You can use parameters x_axis_show and y_axis_show to hide both axes.


Relevant parameters:

style no-title
type line
x_title tijd
y_title niveau
line_lty 2, 1, 1
hline_bold 100
x_axis_show n
y_axis_show n
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Please note that the figure above uses long dashes (line_lty= 2), while the adviced default is short dashes (line_lty= 3).

You can use the following styles to add an extra axis.

  • style = x-top the x-top style creates extra space for an axis at the top of your figure.
    • This style entails the following settings. y_title_align: right, margin_north_extra: 0.2 cm
  • style = y-right the y-right style creates extra space for a secondary y-axis at the right of your plot.
    • This style changes some settings under the hood (not visible to user).

6.3.4 Details on the axis labels

If you want to change the values put on the axis by James, you can use parameter x_lab and y_lab.

If at least one of the values on the x-axis contains a letter, then James treats all values as text. It may however happen that all the values on the x-axis are numeric while you want them to be treated as text. In that case you can use parameter x_lab_as_text= y to space the numbers on the x-axis equidistant. You can add a thousand mark with x_lab_big_mark_show= y if you don’t deal with e.g. years on the x-axis. You can switch to English separators by style= english. Lastly, you can change the precision of the values on the x-axis with parameter x_n_decimals. More details in the following subsection.

6.3.5 Parameters to tweak axes, gridlines and ticks

If your figure has bars (bar-- or bar=) or stacked areas (area=), by default there will be a bold gridline at y = 0. For other figures, only if there is a gridlines is at height *y* = 0, that gridline is made bold (c.f. x_axis_bold_if_zero).

You can manually choose to add a bold horizontal line to your figure by setting hline_bold to the desired y-value. Parameters hline_lwd and hline_col adjust the lines thickness and colour, respectively.

It is easy to adapt the layout of the axes (decimal separerator, etc.) when switching between languages with style = english (default style is Dutch). See also parameter(s): style.

  • axis_barplot_col: colour of extra axis in barplot. The value is of type ‘string’. For the default style the value is black. See also parameter(s): axis_barplot_lwd.
  • axis_barplot_lwd: line width of axis at y = 0 in case of barplot. The value is of type ‘numeric’. For the default style the value is 1. See also parameter(s): axis_barplot_col.
  • big_mark: big mark is put beween every 3 decimals before the decimal separator. The value is of type ‘string’. Example(s): . or ,. For the default style the value is .. For the english style the value is ,.
  • decimal_mark: decimal separator. The value is of type ‘string’. Example(s): . or ,. For the default style the value is ,. For the english style the value is ..
  • force_y_at: normally James adds whitespace around the graph (see parameter empty_fraction_plot). You can force James to put the gridlines at precisely y_at (value: y). Otherwise (value: n) James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the value is n.
  • x_at: position at which you want labels at the x-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_ticks, x_lab. Figure(s) using ‘x_at’: Two series of whiskers in one plot.
  • x_axis_bold_col: color of x-axis. The value is of type ‘string’. For the default style the value is black. See also parameter(s): x_axis_bold_if_zero.
  • x_axis_bold_if_zero: switch off the horizontal bold line if you don’t want it. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): x_axis_show.
  • x_axis_bold_lwd: line width of x-axis. The value is of type ‘numeric’. For the default style the value is 1. See also parameter(s): x_axis_bold_if_zero.
  • x_axis_show: show the x-axis. Set n if you want to hide x_lab and x_ticks. The grid lines (parameter y_at) are shown independently of the axis. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): x_lab, x_ticks, y_axis_show, y_at. Figure(s) using ‘x_axis_show’: Six different line types, trend-vs-niveau.
  • x_lab: the labels you want at the positions x_at. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): x_at, x_ticks, x_lab_bold, x_lab_italic.
  • x_lab_as_text: if ‘y’, values at the x-axis are seen as text instead of numbers. This enables you to show equidistant bars above unequally spaced x-values (years 2000, 2009, 2010). The value is of type ‘bool’. Figure(s) using ‘x_lab_as_text’: Number of phones in the world, Number of phones in the world.
  • x_lab_big_mark_show: for the values at the x-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘x_lab_big_mark_show’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Toeslagen.
  • x_lab_bold: makes the i’th label bold. You can combine bold with italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_italic, y_lab_italic. Figure(s) using ‘x_lab_bold’: {x,y}lab{bold,italic}.
  • x_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘x_lab_col’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  • x_lab_date_show: if y, dates are shown instead of numbers (n). The value is of type ‘bool’. Figure(s) using ‘x_lab_date_show’: Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  • x_lab_font_size: relative font size of the labels on the x-axis. The value is of type ‘numeric’. For the default style the value is 1. Figure(s) using ‘x_lab_font_size’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  • x_lab_italic: makes the i’th label italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_bold, y_lab_bold. Figure(s) using ‘x_lab_italic’: {x,y}lab{bold,italic}.
  • x_lab_rotation: rotate the labels at the x-axis. Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘x_lab_rotation’: Impact no-deal Brexit (horizontal).
  • x_lab_v_shift: downshift of the labels at the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.15.
  • x_lim: restrict the range of the x-axis to this limit. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): y_lim, x_keep, x_lim_follow_data. Figure(s) using ‘x_lim’: Ontwikkeling EMU-schuld in schokscenario’s, Oversterfte in 2020, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Groeibijdragen bestedingen, Two series of whiskers in one plot.
  • x_lim_follow_data: if you don’t care about nice labels on the left and right side of the x-axis but if you want to zoom in to your data as much as possible, you can set this parameter to ‘y’. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): x_lim, x_keep. Figure(s) using ‘x_lim_follow_data’: Six different line types, Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Geraamd vanaf 1958, Werkverliezers, Groeibijdragen bestedingen.
  • x_n_decimals: number of digits right of decimal separator on x-axis. If you don’t provide a number, the number of digits will be automatically determined based on the values on the axis. The larger interval the values these span, the less digits shown. The value is of type ‘numeric’. Example(s): 1, 2.
  • x_ticks: overrule the default ticks at the x-axis. Leave empty for default (x_at). NB this parameter is used only if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1990, 1995, 1997, 2000. See also parameter(s): x_ticks_date, x_ticks_lwd, x_ticks_length, x_ticks_col, x_ticks_vshift. Figure(s) using ‘x_ticks’: VWO, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  • x_ticks_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  • x_ticks_date: choose one or two if you want ticks at these places. Beware, the default ticks will not be shown now (set x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of time’. Example(s): years, quarters, months, weeks, days. See also parameter(s): x_ticks. Figure(s) using ‘x_ticks_date’: Groeibijdragen bestedingen, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  • x_ticks_length: not documented yet. The value is of type ‘numeric’. Example(s): -1.4999999999999999E-2. For the default style the value is -2.5000000000000001E-2. For the no-legend style the value is -0.02.
  • x_ticks_length_date: not documented yet. The value is of type ‘numeric’. For the default style the value is -0.03.
  • x_ticks_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.25.
  • x_ticks_vshift: vertical shift of the x-axis. Positive means shift downwards. The value is of type ‘numeric’. Unit: ‘line’. Example(s): -0.5. For the default style the value is 0.
  • x_top_lab_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  • y_at: position at which you want labels and gridlines at the y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using ‘y_at’: ppower, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, {x,y}lab{bold,italic}, Impact no-deal Brexit (horizontal).
  • y_axis_show: use n if you want to hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): y_lab, x_axis_show. Figure(s) using ‘y_axis_show’: trend-vs-niveau.
  • y_force_include_zero: expand y_lim so zero is in range. The value is of type ‘bool’. For the default style the value is n.
  • y_lab: the labels you want at the positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  • y_lab_big_mark_show: for the values at the y-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  • y_lab_bold: makes the i’th label bold. You can combine bold with italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_italic, y_lab_italic. Figure(s) using ‘y_lab_bold’: {x,y}lab{bold,italic}.
  • y_lab_col: color of labels at left y-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. See also parameter(s): y_lab. Figure(s) using ‘y_lab_col’: Impact no-deal Brexit (horizontal).
  • y_lab_font_size: relative font size of the labels on the y-axis. The value is of type ‘numeric’. For the default style the value is 1.
  • y_lab_italic: makes the i’th label italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_bold, y_lab_bold. Figure(s) using ‘y_lab_italic’: {x,y}lab{bold,italic}.
  • y_lim: same as x_lim, but for left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_lim, y_keep, y_r_lim. Figure(s) using ‘y_lim’: A discontinuity.
  • y_n_decimals: number of digits right of decimal separator on y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.

6.3.6 A secondary y-axis

By default, all time series are mapped to the left y-axis. If one needs a secondary y-axis for one or more of the time series, one can use parameter y_axis (e.g. y_axis = l, l, r) to indicate which time series should be projected on the secondary y-axis, respectively. The following figure projects the first time series on the left y-axis and the second time series on the right y-axis. James scales the right y-axis in an automated fashion and provides nice ‘rounded’ values at the gridlines.


Relevant parameters:

type bar--, line
title Economische groei in Nederland
y_title mutatie in %
x_lab_date_show y
x_ticks_date years, quarters
y_axis l, r
y_r_title € miljard
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Please note that although parameter turn = y changes the secondary y-axis to a horizontal ‘x’-axis, James will still consider the axis as a secondary y-axis (and thus not as a secondary x-axis).

This table describes parameters that affect the scale of the right y-axis. Please don’t use the parameters together.
Parameter Explanation
y_r_scale_auto= y This is the default. James auto-scales the right y-axis
y_r_scale_auto= n The right y-axis stretches exactly from the minimum to the maximum value in the corresponding data
y_r_lim= 674, 800 This way you can set the min and max value at the right y-axis manually.

6.3.6.1 Parameter y_r_scale_auto

In case of the default setting y_r_scale_auto= y, James’ procedure to determine an adequate right y-axis is as follows. James first determines the left y-axis as usual; i.e., equally spaced ‘round’ values which cover the range of the values that are projected on the left y-axis. This results in a certain number of gridlines. This number of gridlines fixes the number of values James wants on the right y-axis. Given this number, James determines equally spaced ‘round’ values which cover the range of the values that are projected on the right y-axis. Please note that because the number of values on the right y-axis is fixed, the scaling may be suboptimal.

If you don’t want this automatic scaling, you can set y_r_scale_auto = n. James will then use the minimum and maximum value that is projected on the right y-axis and put those on the lowest respectively highest gridline. The values inbetween are interpolated.


Relevant parameters:

type bar--, line
title No auto-scaling
y_title mutatie in %
x_lab_date_show y
x_ticks_date years, quarters
y_axis l, r
y_r_title € miljard
y_r_scale_auto n
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.3.6.2 Parameter y_r_lim

If you don’t like the minimum and maximum values, you can manually change those values with parameter y_r_lim. The values inbetween are interpolated.


Relevant parameters:

type bar--, line
title The use of y_r_lim
y_title mutatie in %
x_lab_date_show y
x_ticks_date years, quarters
y_axis l, r
y_r_title € miljard
y_r_lim 674, 800
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.3.6.3 Parameters to tweak your secondary y-axis

The following parameters may be used for a secondary y-axis.

  • y_axis: indicates for each of the respective time series whether they are projected on the left (l) y-axis or on the right (r) y-axis. If one or more series are on the right axis, style ‘y-right’ or ‘x-top’ (if ‘turn = y’) are automatically added as a style. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): l, l, l, r, r. For the default style the value is l. See also parameter(s): style, turn. Figure(s) using ‘y_axis’: Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  • y_r_lab: the labels you want at the right y-axis. Please leave empty to let James find proper values. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab, y_r_lab_col, y_r_n_decimals. Figure(s) using ‘y_r_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  • y_r_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘y_r_lab_col’: Impact no-deal Brexit (tall).
  • y_r_lim: set limit of right y-axis (see y_lim). Please note that, based on the given y_r_lim range, James tries to find ‘nice values’ for the right y-axis, where the number of values equals the number of gridlines as given by the left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): y_lim, y_r_n_decimals. Figure(s) using ‘y_r_lim’: The use of y_r_lim.
  • y_r_n_decimals: number of digits right of decimal separator on right y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals.
  • y_r_scale_auto: lets James find scale the right y-axis so that (i) the number of values on the right y-axis is equal to the number of gridlines as set by the left y-axis, and (ii) the values on the right y-axis are ‘pretty’. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): y_r_n_decimals. Figure(s) using ‘y_r_scale_auto’: No auto-scaling.

6.3.6.4 Exception: a secondary y-axis for one part of the x-axis

By exception it may happen however, that one only wants to map a fraction of the figure on the secondary y-axis. The following figure illustrates how to do so for a particular case where the impact of a no-deal Brexit is shown per country. The impact of one of the countries is shown at the secondary y-axis. Please note that the data of this single country was scaled by hand (i.e. divided by five) and that the labels at the secondary y-axis were placed by hand too. Because turn = y, the secondary y-axis becomes the x-axis at the top of the figure.


Relevant parameters:

style tall
type bar--, bar--, whisker, whisker, whisker, whisker
title Impact no-deal Brexit (tall)
y_title % verandering
y_lab -5; -4; -3; -2; -1; 0; 1
turn y
x_ticks 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
y_r_title % verandering VK
y_r_title_col rose
vline_dash 3
text_x 2, 4
text_y -2, -2
text_label zie bovenste x-as;; zie onderste x-as
text_col rose, black
x_lab_col rose, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black
y_r_lab -25; -20; -15; -10; -5; 0; 5
y_r_lab_col rose
whisker_legend_show_n 0
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The following figure shows the exact same data, without swapping the x- and y-axis (i.e. turn = n). This keeps the countries on the x-axis.


Relevant parameters:

type bar--, bar--, whisker, whisker, whisker, whisker
title Impact no-deal Brexit (horizontal)
y_title % verandering VK
y_title_col rose
y_lab -25; -20; -15; -10; -5; 0; 5
y_lab_col rose
x_ticks 1, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18
y_r_title % verandering
x_lab_rotation 45
y_at -5, -4, -3, -2, -1, 0, 1
vline_dash 3
text_x 2, 4
text_y -2, -2
text_label zie linker y-as;; zie rechter y-as
text_rotation 90
text_col rose, black
x_lab_col rose, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black, black
y_r_lab -5; -4; -3; -2; -1; 0; 1
legend_n_per_column 1
legend_y 0.5
whisker_legend_show_n 0
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.4 Legend

If you don’t want a legend, you can set style = no-legend. If you do want a legend you can customize it with the following parameters.

The following parameters may help to tweak your legend (e.g. number of items per column).

  • legend_column_space: space between columns in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.375.
  • legend_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  • legend_forecast_show: added shaded block with dashed line to legend if forecast_x is set. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): forecast_x.
  • legend_forecast_text: forecast in right language. The value is of type ‘string’. For the default style the value is start raming. For the english style the value is prognosis.
  • legend_line_distance: space between lines in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.315.
  • legend_n_per_column: number of time series names per column in legend. The value is of type ‘numeric’. Example(s): 1, 4. For the default style the value is 3. For the fan style the value is 4. For the ppower style the value is 4. Figure(s) using ‘legend_n_per_column’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal), VMBO, Verwacht verlies in verschillende scenario’s.
  • legend_order: use this to shuffle order or make selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 3, 5. Figure(s) using ‘legend_order’: Partly dashed line, NL’ers hebben buitenlandse obligaties, Cohorten omvatten veel asielmigranten, Participatie gemeenten, Two series of whiskers in one plot.
  • legend_show: put at n if you don’t want a legend. Doing so will keep the rest of the figure unchanged. If you want to make use of the space that emerges from hiding the legend, you can set ‘style = no-legend’. The value is of type ‘bool’. For the default style the value is y. For the no-legend style the value is n. See also parameter(s): style.
  • legend_space_symbol_txt: space between symbol and text. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.15.
  • legend_symbol_height: not documented yet. The value is of type ‘numeric’. Unit: ‘fraction of legend_line_distance’. For the default style the value is 0.8. See also parameter(s): legend_line_distance.
  • legend_symbol_width: width of symbol in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.3.
  • legend_x: position of left side of legend. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.03. For the default style the value is 0.45.
  • legend_y: position of top of legend, seen from bottom of figure. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the default style the value is 1.3. For the map style the value is 1.08. Figure(s) using ‘legend_y’: VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal).
  • name: names of the individual time series. These overwrite the series names in the headers of the data sheet and thus also in the legend. Beware: use ;; as separator between names. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp;; inflation;; interest. Figure(s) using ‘name’: Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.

6.5 Colors

James makes it easy to color your time series by putting nice combinations of colors in a so-called palette. You set the palette with parameter palette. The default is palette = auto. Please note, auto is not a palette. auto will be replaced by either cpb_3 if there are less than four time series or by cpb if there are more time series. An alternative is palette = kansrijk so that the kansrijk colors are used (see below for its colors). Might you run out of colors in one palette, you can easily join different palettes, e.g. by palette = cpb, appletv, which concatenates these two palettes. Subsection Customization of colors and palettes shows an example that customizes colors. Subsection Parameters to tweak your colors describes the use of palette in more detail. Below you’ll find the appletv and other carefully composed palettes.

If you start James in R, you can get the exact hex triplet for the cpb palet as follows.

get_pal("cpb")
##   endeavour anakiwa    rose mauvelous   brown cold_turkey   siren  biscay  dorado
## 1   #005faf #87d2ff #e6006e   #F596AF #96827d     #d7c8c8 #820050 #193c69 #64504b

If you deal with less than four time series:

get_pal("cpb_3")
##   endeavour    rose   brown
## 1   #005faf #e6006e #96827d

6.5.1 Color palettes

All except the first four pallets originate from the yarrr pacakge. Kudos for the yarrr package!

6.5.1.1 The default CBP color palette

James gives each color a name. You can admire a specific palette and get the names of its colors as follows in R.

  show_col_pals("cpb", TRUE)

6.5.1.2 The kansrijk color palette

6.5.1.3 The fan color palette

Fan charts are a special case of the bandwidth plots. If style is set to fan, James will use the below fan palette.

6.5.1.4 Other colors to choose from

6.5.2 Customization of colors and palettes

The use of a color palette makes it straighforward to customize the colors in your figure. You can manually set parameter palette to a combination of palettes and separate colors as defined above. The figure below combines three separate colors (red, blue, white) with a palette (appletv).


Relevant parameters:

type bar=, bar=, bar=, bar=, bar=, line
title Groeibijdragen bestedingen
y_title %-punt bbp-groei
name_col bbp-groei=black
line_lty 3
palette red, blue, white, appletv
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

James evaluates colors in a recursive manner. Meaning, if the color itself is a parameter (e.g. ‘cpb’ or ‘kansrijk’), James will replace it with its parameter value. The values will be evaluated in turn. If a value is a parameter that refers directly to a color (e.g. ‘sun’ = #fbad1d), then it eventually will be replaced by its hex triplet. So, you can combine palettes, color names and hex triplets in any order when defining a palette. You can make a color transparent by appending two hexadecimal numbers to the hex triplet (e.g. #ff0000 is red, and #ff000088 is semi-transparent red). These two numbers indicate the degree of opacity (i.e. 00 means fully transparent, ff means fully opaque).

6.5.3 Parameters to tweak your colors

For colors James uses the hex triplet coding. For example, red = #ff0000. You can use both color names for which a color is defined as hex triplets to indicate which colors you want to use.

6.5.4 Example with many lines

Relevant parameters:

style wide
title Coloring many series in a clear and unique fashion is challenging
palette kansrijk, extra
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

6.6 Add the CPB-logo to your figure

For official figures, you may want to add a logo on top. Parameter logo= y does so. Text next to the logo is by default Centraal Planbureau and if style = english then the text is CPB Netherlands Bureau forPolicy Analysis.


Relevant parameters:

style tall
type bar=
title Violent crime rates in the USA
x_title state
y_title Number per 100,000
turn y
logo y
order 1, 2, 4
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.
  • logo: shows CPB-logo above figure. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘logo’: Forecasted from 1958, Geraamd vanaf 1958, Violent crime rates in the USA.
  • logo_file: file that holds your logo. The value is of type ‘path’. For the default style the value is ext/img/rijkslogo.png.
  • logo_height: height logo should have in the figure. Width is auto-scaled. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 1.
  • logo_text_en: english text next to logo. The value is of type ‘string’. For the default style the value is CPB Netherlands Bureau for\nEconomic Policy Analysis.
  • logo_text_nl: dutch text next to logo. The value is of type ‘string’. For the default style the value is Centraal Planbureau.

7 Add markup to your figure

7.1 Dutch or English notation

You can use style = english if you want numbers to have a dot (.) as decimal separator and a comma (,) for thousands separator. If you use the cpb logo (logo_show = y, explained elsewhere), this style will make sure that the text next to the logo is in English too.

This style entails the following settings; please note that a comma (‘,’) separates the items here (this may be a little confusing). decimal_mark: ., big_mark: ,, legend_forecast_text: prognosis, forecast_text: prognosis

This style combines with other styles always.

7.2 Text label

The figure below is an example how you can add a text label if your x-axis is of type ‘date’. Please see Section ‘Axes’ for details on dates on axes.


Relevant parameters:

title Industriële productie en detailhandel
y_title geïndexeerd (2015=100)
text_x 2016, 2021
text_y 108, 97
text_label steady increase;; sharp fall
text_rotation 25, -85
text_col green, red
text_font_size 2
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

If your x-axis comprises dates, you should use text_x_date instead of text_x as in the following figure. Please see the subsection on parameters for datails.


Relevant parameters:

title Rentespreads op overheidsschuld
y_title %
x_lim 2020.09, 2020.38
vline_dash_date 43908
text_x_date 2020-03-18
text_y 4.5
text_pos 4
text_label 18-mrt
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

7.2.1 Parameters to tweak your text label

7.3 Text labels as time series

This section explains how you can add many text labels to your figure, in an easy way. If you want to add many text labels you can go one step further and treat them as a ‘time series’.

TODO HIER ANDERE VARS TOEVOEGEN VOOR MEER CONTROLE

  • label: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘;;’.
  • label_align: 0: alignment at given coordinates, 1: below, 2: left, 3: above, 4: right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, 3, 4. For the default style the value is 4.
  • label_col: label colour. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black.
  • label_font_size: relative to font size of title. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘label_font_size’: Overlapping labels (NL, PT), Different alignment for PT.
  • label_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  • label_offset: distance (‘offset’) of the text label from the specified coordinate in fractions of the width of the letter ‘m’. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0.5.
  • label_rotation: the rotation of the label in degrees counterclockwise. Zero (0) means horizontal, 90 means vertical. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 45, 90. For the default style the value is 0.
  • label_series_n: the number of the time series that you want to label. The value is of type ‘numeric’. For the default style the value is 1.

The following figure illustrates how one can create a parameter from one of the columns in the data tab. With Parameter label_series_n you can set which time series you want to label. It has a default value of 1, which is the first time series and thus the series we want to label, so there is no need to set it here. Parameter label_align determines the positions of the labels in the figure. The default aligment is label_align = 4, meaning ‘to the right of the given position’. As you can see, the labels PT and NL overlap in the following figure.


Relevant parameters:

style no-legend
type dot, param
title Overlapping labels (NL, PT)
x_title Overdrachtsbelasting (%)
y_title Aantal transacties per 1000 inwoners
x_lim 0, 11
dot_size 0.8
label_font_size 0.9
rect_xleft 1.75
rect_ybottom 10.5
rect_xright 3
rect_ytop 14
rect_col yellow
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The following figure fixes the overlap by adding parameter label_align to the data tab and sets a specific value of 1 (meaning: align below) to label PT. In addition the space between the labels and the dots is reduced with text_offset = 0.25.


Relevant parameters:

style no-legend
type dot, param, param
title Different alignment for PT
x_title Overdrachtsbelasting (%)
y_title Aantal transacties per 1000 inwoners
x_lim 0, 11
dot_size 0.8
label_font_size 0.9
text_offset 0.25
rect_xleft 1.75
rect_ybottom 10.5
rect_xright 3
rect_ytop 14
rect_col yellow
rect_border rose
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

Section ‘The data tabs’ explains in more detail how and when to use the data tab to set or create parameters that can be used in the plotting.

7.4 Add help lines and shading

James offers several ways to add help lines and shading to a plot. Parameter x_shading shades part of your figure before the plotting starts, parameter shading_suppress_x applies the shading after the plotting takes place. Therefore, shading_suppress_x enables you to ‘mask’ part of your plot. The first figure demonstrates the use of shading_suppress_x, c.q. shading_suppress_x_date.

Relevant parameters:

cbs_url https://opendata.cbs.nl/statline/#/CBS/nl/dataset/70895ned/table?dl=45E64
style wide
type line
title Eerste indruk: corona treft ouderen buitenproportioneel
y_title Aantal overledenen per week
footnote De stippellijnen markeren de eerste piek (14 maart t/m 14 mei). Bron: opendata.cbs.nl.
vline_dash_date 2020-03-14, 2020-05-14
order 2, 3, 4
custom points(rep(lubridate::decimal_date(as.Date(“2020-01-11”, origin = “1899-12-30”)), 3), c(432, 967, 1966), col = “gray50”, cex = 1)
col_order 3, 1, 2
shading_suppress_x_date 2020-01-01, 2020-03-14, 2020-05-14, 2021-01-01
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The second figure demonstrates the use of x_shading, c.q. x_shading_date.

Relevant parameters:

cbs_url https://opendata.cbs.nl/statline/#/CBS/nl/dataset/70895ned/table?dl=45E64
style wide
type line
title Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+
y_title Gestandaardiseerd aantal overledenen per week
footnote Aantallen zijn hier gedeeld door respectieve aantallen in de week van 2020-01-11 (cirkel).
footnote_col rose
scale 0.002314815, 0.001034126, 0.000508647
order 2, 3, 4
hline_dash 1
custom points(lubridate::decimal_date(as.Date(“2020-01-11”, origin = “1899-12-30”)), 1)
col_order 3, 1, 2
x_shading_date 2020-03-14, 2020-05-14
x_shading_col anakiwa
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

7.4.1 Parameters to tweak help lines and shading

  • grid_lines_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  • grid_lines_lwd: line width. The value is of type ‘numeric’. For the default style the value is 0.25.
  • hline_bold: by default the lowest gridline is bold. Except if your plot contains bars and zero is visible, then the default is zero. If you want the bold line(s) to appear at other places, you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the value is 0. Figure(s) using ‘hline_bold’: Hello World, Bbp tijdens crises, Partly dashed line, Oversterfte in 2020, VWO, VWO, trend-vs-niveau.
  • hline_bold_col: line color. The value is of type ‘string’. For the default style the value is black.
  • hline_bold_lwd: line width. The value is of type ‘numeric’. For the default style the value is 1.
  • hline_dash: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘hline_dash’: Kans om in risicogroep te zitten, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Two series of whiskers in one plot.
  • hline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  • hline_dash_lty: not documented yet. The value is of type ‘numeric’. For the default style the value is 3.
  • hline_dash_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  • shading_suppress_col: not documented yet. The value is of type ‘string’. For the default style the value is #ffffff88.
  • shading_suppress_x: same as x_shading, except that it is ran after most plotting is done so you can suppress parts of plot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_shading.
  • shading_suppress_x_date: same as shading_suppress_x, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): shading_suppress_x. Figure(s) using ‘shading_suppress_x_date’: Eerste indruk: corona treft ouderen buitenproportioneel.
  • vline_bold: to be implemented The value is of type ‘numeric’.
  • vline_dash: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘vline_dash’: Oversterfte in 2020, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  • vline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘vline_dash_col’: Oversterfte in 2020.
  • vline_dash_date: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): 2020-12-31. Figure(s) using ‘vline_dash_date’: Eerste indruk: corona treft ouderen buitenproportioneel, Rentespreads op overheidsschuld.
  • vline_dash_lty: not documented yet. The value is of type ‘numeric’. For the default style the value is 3.
  • vline_dash_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  • x_shading: vertical shading (from, to, from, to, etc.). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
  • x_shading_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is #00000022. Figure(s) using ‘x_shading_col’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
  • x_shading_date: same as x_shading, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): x_shading. Figure(s) using ‘x_shading_date’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.

7.5 Add rectangle

With parameters rect_xleft, rect_ybottom, rect_xright, rect_ytop you can specify the sides of the rectangle you want to add. You can color the interior of the rectangle with parameter rect_col and its border with rect_border. You don’t have to color both, i.e. you can choose to color only the interior or the border. Please see this figure for an example.

8 Add or edit the data

This section explains how to (i) manipulate or preprocess (e.g. scale) data before plotting it, (ii) how to add a formula/function, (iii) add data from CBS using only a url, and (iv) ultimately add your own R code to make any plot you want in the given CPB-style.

8.1 Data manipulation

You are free to use functions and algebra in your xlsx-file. James will use the result of that. So, if you would put = 1 + 1 in a cell, Excel will show you the anser (2), which will be used by James, too.

Next, there are several ways (c.q. parameters) to manipulate your data after you save them in your xlsx-file but before you create the figure:

Data operations, executed in the order: order(_name), scale, keep, transformation.

Please beware of the order in which the data manipulations are performed.

The first step and most straightforward one is order, which you can use to re-order your columns before anything else happens. For example, if you would have a data set with only two time series, order = 2, 1 will have the same effect as swapping the corresponding two columns in the xlsx-file.

The second step uses parameters x_raw_keep and y_raw_keep to indicate which raw data you want to keep and discard. The advantage of removing data early in the process (here: before scaling), may save computational time and thereby speed-up the process.

The second step in the data manipulation phase is the scaling of your data. For example, scale = 100 may be used to convert fractions into percentages. If you supply only one value here, that value will be applied to each series. However, you may also choose to scale different series with different values. For example, if you have two time series and scale = 100, 1, the first one will be multiplied by 100.

Third step: similarly to scaling your y-values, with x_scale you can scale the values on your x-axis. Please see this figure for an example.

The fourth step uses parameters x_keep and y_keep to indicate which data you want to keep after the scaling has taken place. Data outside these ranges is discarded.

The fifth and last step in the data manipulation phase is a transformation with custom R-code. You can put your own custom transformation function there, but you can also use R’s built-in-functions such as log in the next figure. Please note that data are first scaled and then transformed.


Relevant parameters:

type line
title Werkverliezers
y_title dzd personen op log-schaal, 15-74 jaar
x_lim_follow_data y
transformation log
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

The parameter x_lim_follow_data = y (see x_lim_follow_data) makes the x-axis zoom-in to the max so you don’t have white spaces left and right. This parameter will be discussed in more detail in the section about axes.

8.2 Plot a function

There are two ways to visualize the function of a given formula. First, you can use formula’s in Excel (see Section ‘Data manipulation’ for details). Second, with the parameter formula.

The following figure adds the sinus of the x-values in the example from Section ‘A kick-start example’, multiplied by ten. Please note that the first column in the data parmeter (i.e. p$data[, 1]), holds the x-values. The following column in the data parameter (i.e. p$data[, 2]) holds the first time series (here: (6 - x)^2), the third column (i.e. p$data[, 3]) holds the second time series, and so on.


Relevant parameters:

type line
title Hello World
x_title x
y_title y
hline_bold 0
formula 10 * sin(p$data[, 1])
formula_name sinus
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

8.2.1 Tweak your formula

  • formula: append outcome of formula after last column to data. Please note, your data x-values are in p$data[, 1]. The first series’ values are in p$data[, 2], the second in p$data[, 3] and so on. So, the example determines the mean of the first and second series. The value is of type ‘string’. Example(s): rowMeans(p$data[, 2:3]). Figure(s) using ‘formula’: Hello World.
  • formula_name: legend name of formula. The value is of type ‘string’. Example(s): sinus. Figure(s) using ‘formula_name’: Hello World.

8.3 Add own R-code to further customize your figure

Obviously, James can’t just make any figure you can think of. If you want to go beyond James’ current limits, you may consider to start with a basic figure - so you get the CPB-style for free - and enrich that with custom R-code. The following figure, for example, adds differently sized symbols and a custom legend to the figure. Please beware, the current version of the manual does not correctly show the value of parameter custom here; the $-sign is interpreted wrongly here. As a workaround, please download the xlsx-file via the link below the figure if you want to scrutinize this example in detail.

Relevant parameters:

style wide, no-legend, english
type dot, param
title Older workers more productive?
x_title age (years)
y_title productivity (a.u.)
dot_size 0
text_x 25, 55, 10, 10, 10, 10, 10
text_y 1.5, 2.3, 3.33, 3.13, 2.93, 2.73, 2.53
text_pos 1, 1, 4, 4, 4, 4, 4
text_label Detailhandel;; Overheid,<backslash-n>onderwijs,;; Number of observations;; 4;; 8;; 12;; 16
text_font_style 3, 3, 2, 1, 1, 1, 1
custom points(p\(data[, 1], p\)data[, 2], pch = 19, cex = p$data[, 3] / 16, col = get_col_from_p(p, “endeavour”)); points(rep(14, 4), c(3.13, 2.93, 2.73, 2.53), pch = 19, cex = 1:4 / 4, col = get_col_from_p(p, “rose”))
How to reproduce this figure: copy this xlsx-file and james-l02p-2022-06-18.bat (starts on Windows, runs on Linux), james-windows-2022-06-18.bat (starts on Windows, runs on Windows), or james-2022-06-18.sh (starts on Linux, runs on Linux) to a personal directory and start the batch file. Alternatively, you can also run this R-script in R (starts in R, runs in R). If you use the package ‘nicerplot’, you can download the RData file and this R-script to plot from the Excel-file or RData in R.

8.3.1 Parameters to tweak your custom figure

Custom R-code that will be run after James finishes the rest of the plotting.

9 Input, output and pipelines

This section provides more details on the input files, the output files and the steps in between (chained in pipelines). It discusses the structure of the xlsx-file. It also explains the details you need if you start creating your own xlsx files from scratch.

9.1 Output file name and format (gif, jpg, pdf, png, svg)

9.1.1 File name

Parameter file sets the base of the file name of your figure(s). The base is the part before the suffix (extension). If you don’t set file, James will set a default file name that is based on respectively id, title, or tab name, whichever is set by you. If nothing is set, james-figure will be set as base.

Fonts, the use of different character scripts, special characters and white spaces in file names are a potential source of errors. Therefore, any punctuations, special characters and white spaces in the file name are automatically removed and replaced with a dash (-). Please note that, for the sake of consistency, this includes underscores (_). You may prevent these corrections of the the file name by setting parameter file_correct_name= n.

In any case, as a last step, the characters of your file name are converted to the commonly used Latin-ASCII set of characters.

9.1.1.1 Parameters to tweak file name and file location

  • file: base file name of figure, id est, before the suffix .jpg, .pdf, .png or .svg is added. The value is of type ‘string’. Example(s): my-beautiful-figure. See also parameter(s): file_correct_name.
  • file_correct_name: replace special characters, punctuation, white spaces, underscore with a dash (-). The value is of type ‘bool’. For the default style the value is y. See also parameter(s): file.
  • gif_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  • gif_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  • gif_pngs: the series of png’s that is used for the gif. The value is a list with elements of the type ‘path’ separated by ‘,’.
  • jpg_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  • jpg_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  • pdf_dir: destination directory for your pdf’s. Use / as separator. The value is of type ‘path’. For the default style the value is ..
  • pdf_file: sets path/to/location/with-file-name.pdf. If you leave the parameter empty, it defaults to destination_path/pdf_path/file.pdf. The value is of type ‘path’. See also parameter(s): file.
  • png_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  • png_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  • svg_dir: destination directory for your svg’s. Use / as separator. Please note: you should put create_svg at y to produce svg’s instead of pdf’s and png’s. *Pro feature. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  • svg_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  • time_stamp: adds time-stamp to file name. The value is of type ‘bool’. For the default style the value is n.

9.1.2 File format

You can just add the formats you want as boolean parameters to your meta tab. By default png = y and other formats are put to n by default.

Examples:

  • gif = y provides an animated figure with data starting at zero and ‘growing’ in gif_n_frames frames (default 20) to their actual values. You can set the delay between the steps with paramter gif_delay (default 0.1 seconds). This setting is described in more detail further on. NB This setting may work but is not regularly checked and not supported.
  • jpg = y provides a jpeg file. This is a compressed file, which may be used to save disk space. The image quality can be controled by quality (default 75). NB This setting may work but is not regularly checked and not supported.
  • pdf = y provides a vector graphics version of your figure (i.e. ‘infinite’ resolution), which may be used in LaTeX or pdf documents.
  • png = y (the default) provides a so-called ‘portable network graphics’ version of your figure. This setting is recommended because png’s are not compressed (and are hence less blurry than jpg’s) and guarantee that their layout (including font) is invariant between different software programs that show them (e.g. Word, pdf, PowerPoint, etc.).
  • svg = y provides a scalable vector graphics version of your figure, which may be used on e.g. websites. Svg is also vector graphics but not displayed in each word processing program. NB This setting may work but is not regularly checked and not supported.

So, we recommend using the default png unless you have good reasons to use a different format.

9.1.3 A gif is an animated image

Please <contact the author> if you want to gifify your figure :-)

9.2 Input xlsx file

James only processes xlsx files that have a tab called meta. Other files, i.e. .xls, .csv files, or xlsx files that don’t have a meta tab, are ignored.

9.2.1 The meta tab

The meta tab defines your figures. The first column contains the parameters (e.g. for a title). Each following column defines a different figure with parameter values specific for that figure. Each figure should refer to either a data tab (using the parameter tab) or to a CBS-url. Two figures may share one and the same data tab. If you want to make the exact same figure twice, once in Dutch and once in English, you probably prefer to use one and the same data sheet for both figures. In that case, you can distinguish the two figures with the parameter id. Details:

9.2.1.1 Parameter types in the meta tab

A parameter in the meta tab has either a value or a list of values. A value can be of the following types:

  • bool: this means Boolean and should take value y (full list: y, Y, yes, Yes, YES, T, TRUE) or n (full list: n, N, no, No, NO, F, FALSE).
  • numeric: any numeric value. For single cell values, the decimal separator depends on your Excel’s language settings. If you put multiple values in a cell (e.g. separated by a comma or semicolon), then you should use a dot (.) as decimal separator because the interpretation is done by James in R.
  • path: refers to a file or a path on disk
  • string: any consecutive sequence of letters, digits and some special characters (e.g. -, _)

If a parameter is a list, then the values are separated by the list separator of the parameter. Different parameters may use different list separators. The list separators are: , / ; / ;; (separated by /). A reason to use not one but different list separators is this. Decimal numbers that are interpreted as a number by Excel should use the decimal separator that is set as such in Excel’s settings. Decimal numbers that are interpreted by James, such as sequences of numbers (e.g. 1.0, 2.73, 3.14), must use a point (.) as decimal separator. Decimal numbers may be separated in a simple manner by just a comma (e.g. 1, 2.0). Strings however may contain a comma, so they may be separated by a semicolon (e.g a, b; c). If, however, the string may contain a semicolon itself, a double semicolon may be used for that parameter (e.g. a, b; c;; d).

Why three different separators? That indeed isn’t stricly necessary. One could have chosen to use the double semicolon everywhere. That however would have been ugly and cumbersome. Therefore, James chooses to use a parameter dependent list separator. You can find the specific list separator a parameter uses in its definition in this manual. Each parameter also includes the type of its values.

9.2.2 The globals tab

To save time and effort, you may add a tab called globals. Parameters defined in this tab are assigned to each of the figures in the meta tab, unless overwritten there.

9.2.3 The data tabs

There are two different ways to refer to a data set for your figure. One of them is via the parameter tab in your meta tab. The other way is to refer to a data set via a CBS link (discussed in the next subsection). The value of the parameter tab should equal the name of one or more of the tabs in your xlsx file and hold your data. Such a ‘data tab’ can have different forms. The most straightforward form is x-values in the first column, and time series in the following columns. Each time series should have a header (i.e. a name) defined in the first row of the tab. Section ‘Text labels as time series’ illustrates how to define a parameter in the data tab so you can easily assign a different value for the parameter to each x-value.

9.3 Execution pipelines

Based on the parameters, James creates the figures by executing a pipeline of functions. The pipeline generally comprises two steps. First data are pre-processed. This idea separates the work that can be done before plotting takes place from the actual plotting steps. Doing so may make debugging easier (set [debug](#parameter_debug)``= y). You may customize James by overriding one or more of the pre-processing and plotting functions. In addion you can change the plotting order and extend the pipeline with own custom functions.

9.3.1 The default pipeline

First a series of pre-processing functions are executed. You can easily add new functions (see parameter preprocess_order) and/or override these functions: (1) add_style, (2) preprocess_data_grouping_variables, (3) validate, (4) draft, (5) append_formula, (6) data_operations, (7) preprocess_first, (8) replicate_params, (9) forecast_pre, (10) label_pre, (11) area_stack_pre, (12) hist_pre, (13) bars_pre, (14) whisker_pre, (15) box_pre, (16) dot_pre, (17) linez_pre, (18) area_pre, (19) color_pre, (20) legend_pre, (21) set_lims, (22) set_labs, (23) find_y_r_scaling, (24) logo_pre.

Next, the process functions are executed (see parameter plot_order): (1) format_labs_set_margin_west, (2) set_layout_and_init_plot, (3) set_line_distance, (4) forecast_bg, (5) shading, (6) rectangle, (7) axes, (8) gridlines, (9) area_stack, (10) area, (11) bars, (12) extra_axis_barplot, (13) jbox, (14) dot, (15) linez, (16) linez_lsfit, (17) whisker, (18) label, (19) shading_suppress, (20) custom, (21) user_line, (22) text_label, (23) forecast, (24) margins_0000, (25) j_legend, (26) titles, (27) footnote, (28) logo.

If you want to further improve or extend James, you can update these functions by overriding them in R or add novel functionlity in an R script and adapting the preprocess_order and plot_order lists accordingly.

9.3.2 Pipeline to create a map of The Netherlands

This pipeline is used for geographic maps of The Netherlands.

  • plot_order_geo: plot functions are called in this order. You may overwrite a function if you want to customize it. Alternatively, if you want to add your own custom plotting function to James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is geo_init_plot, set_line_distance, geo_plot, margins_0000, j_legend, titles, footnote, logo.
  • preprocess_order_geo: these functions are called in this order before plotting. You may add a new function, by extra_preprocessing(p), where both “james” == class(p) and “james” == class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is geo_init, geo_validate, geo_pre, logo_pre.

9.3.3 Pipeline to create a map of the world

This pipeline is used for geographic maps of the world.

  • plot_order_world: plot functions are called in this order. You may overwrite a function if you want to customize it. Alternatively, if you want to add your own custom plotting function to James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is world_map_init_plot, set_line_distance, world_map_plot, margins_0000, titles, world_map_title_www, footnote, logo.
  • preprocess_order_world: these functions are called in this order before plotting. You may add a new function, by extra_preprocessing(p), where both “james” == class(p) and “james” == class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is world_map_pre, world_map_projection, logo_pre.

10 Create a report

James can put your figures in a report, which enables you to have a quick overview and easily share them with colleagues. Next to your figures, you can add a new column and set type = report there. That’s all.

10.1 A kick-start example

Report with only one fig.

10.2 Title, author, date and adding a figure

10.3 A realistic report

This report is what you get out-of-the-box if you run this xlsx-file (cf. ‘kMEV2021’ or ‘juniraming 2020’).

10.4 Customize the report’s text

10.5 Parameters to tweak your report

  • author: put here the author if you don’t want to use the default. The value is of type ‘string’. Example(s): "r whoami::fullname()".
  • caption: caption if used in Markdown report. The value is of type ‘string’. Example(s): This text explains what you see In the figure.. Figure(s) using ‘caption’: Bestaande koopwoningen, A discontinuity.
  • date: what you want as date. You may use the example if you want today’s date. The value is of type ‘string’. Example(s): "r format(Sys.Date())".
  • pandoc_location_windows: not documented yet. The value is of type ‘path’. For the default style the value is S:/Applicaties/CPB/pandoc.
  • pandoc_location_windows_bat: not documented yet. The value is of type ‘path’. For the default style the value is S:\Applicaties\CPB\pandoc.
  • report_default_data_show: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  • report_default_fig_show: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  • report_default_file: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/james-report-default.Rmd.
  • report_default_param_show: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  • report_dir: not documented yet. The value is of type ‘path’. For the default style the value is report.
  • report_file: not documented yet. The value is of type ‘path’.
  • report_format: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): html, pdf, word, ioslides, slidy, beamer, powerpoint. For the default style the value is html.
  • report_include_james_appendix: not documented yet. The value is of type ‘bool’. For the default style the value is y. Figure(s) using ‘report_include_james_appendix’: report.
  • report_james_appendix_path: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/james-appendix.Rmd.
  • report_show: specify what you want in the header of your report. Please choose at least one. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is title, author, date.
  • report_table_of_content: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  • report_text: you can put your report (R-markdown) text here directly. If you need more space, you can put your text in a sheet and refer to that sheet with parameter tab. The last option is to put your text in a separate file using parameter report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
  • report_text_file: path to the Rmd-file in which you have put the custom r-markdown text for your report (with or without yaml-header). The value is of type ‘path’. Figure(s) using ‘report_text_file’: report.
  • report_yaml_custom: add custom yaml (injected at end). The value is of type ‘string’.
  • report_yaml_default: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-default.Rmd.
  • report_yaml_html: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-html.Rmd.
  • report_yaml_ioslides: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-ioslides.Rmd.
  • report_yaml_pdf: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-pdf.Rmd.
  • report_yaml_powerpoint: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-powerpoint.Rmd.
  • report_yaml_toc: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-toc.Rmd.
  • report_yaml_word: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-word.Rmd.

11 Under the hood

Building the manual involves creating its figures too. Therefore, the building of the manual is a comprehensive test by itself.

The value of a James-parameter may depend on the style(s) you set. You can find these parameter/style combinations in M:/p_james/release/2022-06-18/ext/james-base-settings.xlsx (available as a matrix in variable globals if you run the R-code). You can overwrite a parameter value in both the globals tab and the meta tab of your Excel file.

11.1 A note on parameters

Note to the developer: it requires some discipline to keep the parameters in M:/p_james/release/2022-06-18/ext/james-base-settings.xlsx in sync with the parameters in the R-scripts. Parameters that are used in the R-scripts but don’t exist in the settings file will result in an error. So that’s easy. The other way around can however easily happen: parameters that do existin the settings file but are not used (anymore) in the scripts. The function get_param_settings_not_in_any_R_file() can help to find them. It lists parameters that are defined in the settings file, but seem not used in any R-script nor code snippet in one of the following ways.

  • after a dollar sign (‘$’)
  • after a bracket (‘[’)
  • with the get_param() function

Please beware, the resulting list will indeed contain parameters you may want to remove from the settings file but will also in include colors and parameters that are used but not in one of these three ways. Please keep that in mind when considering to removing a parameter.

11.2 Structure of the software

Please find

  • a copy of this manual: M:/p_james/release/2022-06-18/*/james-2022-06-18-manual.html
  • a batch and an sh script to start James in M:/p_james/release/2022-06-18/
  • examples for this manual (xlsx) in M:/p_james/release/2022-06-18/examples/xlsx/ and .../R/
    • with 0 files total
  • R-code in M:/p_james/release/2022-06-18/R/
    • with 61 files total
  • images in M:/p_james/release/2022-06-18/ext/img/
    • with 14 files total
  • script to create gif’s, plus mapping user names to full names in M:/p_james/release/2022-06-18/ext/misc/
    • with 2 files total
  • report examples, including this manual M:/p_james/release/2022-06-18/ext/report/
    • with 5 files total
  • code snippets including templates to generate scripts in M:/p_james/release/2022-06-18/ext/snippet/
    • with 9 files total
  • markup files in M:/p_james/release/2022-06-18/ext/style/
    • with 2 files total

11.3 Caching and parallel processing

Oftentimes you will save multiple figures in one xlsx-file, while working on only one. In principle, James will re-create each figure again and again, each time you run James. Even if nothing changes. James has a caching mechanism to prevent doing work twice. If any parameter value changes, James will ignore the cache and create the figure. As an alternative to caching, you may use create= n to completely skip a figure.

To further speedup the process creating the figures, James by default processes your figures in parallel. The degree of parallelism depends on the number of nodes in your processor. You can set [parallel](#parameter_parallel) = n in your tab globals to force sequential processing.

James’ parallel processing and caching mechanism can speed-up the figure generation process. It’s parameters are the following.

  • cache: use caching mechanism to prevent the re-creation of the exact same figure if you rerun James. The value is of type ‘bool’. For the default style the value is y.
  • hash_dir: path to hashes. The value is of type ‘path’. For the default style the value is ./generated/cache.
  • hash_p: hash of (meta) data before preprocessing starts. The value is of type ‘string’.
  • parallel: parallel processing The value is of type ‘bool’. For the default style the value is n.

11.4 Installing James

It is easy to move an existing James installation to a new location as James makes use of relative paths where possible. Especially in M:/p_james/release/2022-06-18/R-header.R you need to update paths. If you update James’ software, however, it may be wise to follow a tailored installation script. You can find the two installation scripts in M:/p_james/release/2022-06-18/ext/script/install-james-slow.R and install-james-fast.R (the latter one uses the linux l02p computer to speedup the process). In addition you should set at least the following parameters (see tab ‘install’ in M:/p_james/release/2022-06-18/ext/james-base-settings.xlsx): r_version, cpb_lib_version, james_version, install_local, install_status_production.

As a proof of success the script generates the manual from the freshly installed version. Doing so guarantees that James can indeed reproduce the wide variety of figures shown in the manual. In addition, the install script puts james.bat and all respective xlsx-files in a test directory: m:/p_jamesgebruiker/test/[james_version](#parameter_james_version)/xlsx. This enables a final test that is most closely to how end-users may run James.

11.5 Installing James Start (GUI)

After installing James, you can install the corresponding ‘James Start’ GUI interface. Please run ext/gui/install-james-start.R to do so, after updating the paths in this script to your situation. This script will install James Start on james.cpb.nl/start.

11.6 Stats for nerds

James (version 2022-06-18) built this manual at 2022-06-18 13:30:43. This took 139.8 seconds. The current version of James counts 542 parameters.

11.6 Feature requests and future development

Please add your feature requests or bug report here: https://tinyurl.com/james-feature-request, and <contact the author> afterwards, so it’s easy to

  • [x] mark what has been done
  • [ ] prioritize tasks
  • [ ] contact you

12 Troubleshooting

In general, the advice is to work in small steps; e.g. changing one or two parameters at a time. This helps to isolate a potential problem. However, if you think you’ve found a bug, you indeed most likely did so. In which case, please first check whether there is a new version available in M:/p_james/release. If not, then please put a copy of your xlsx-file in M:/p_jamesgebruiker/q/$usr$ (please replace $usr$ with your own user name) and e-mail your bug report to m.dijkstra@cpb.nl. Thanks!

12.1 Solutions to problems that occurred previously

  • If you make use of formulas in your xlsx-file, please beware of the following. The formulas seem to be evaluated in Excel and not outside of Excel. So, if you create an xlsx-file with e.g. R, and don’t open it with Excel, it may contain unevaluated formulas. Running James on this xlsx-file may thus result in unwanted behaviour.
    • There are two obvious solutions to this problem. First you can open and save the respective xlsx-file using Excel. However, if that’s not feasible due to e.g. automation purposes, you can consider evaluating the formulas beforehand (in e.g. R) and saving the formula’s result instead of the formula.

13 Acknowledgements

13.1 On the origin of James

On April 19, 2017, our King, Willem Alexander van Oranje-Nassau, officially opened our new building B30. That day, prof.dr. Bas Haring was one of the invited speaker. He encouraged us to present our results in terms of stories/parables. His idea inspired the author to frame the discussed software as a person called ‘James’. A personal servant ‘James’ for each of our colleagues!

13.2 Kudos to all of you

Meinou de Vries created James’ logo. Many users exposed bugs in the software and came with valuable suggestions. Kudos to all of you!

14 Appendix

14.1 CBS Geo-regions

This section lists all geo-regions you can choose from:

arbeidsmarktregio_2014, arbeidsmarktregio_2015, arbeidsmarktregio_2016, arbeidsmarktregio_2017, arbeidsmarktregio_2018, arbeidsmarktregio_2019, arbeidsmarktregio_2020, arrondissementsgebied_1995, arrondissementsgebied_1996, arrondissementsgebied_1997, arrondissementsgebied_1998, arrondissementsgebied_1999, arrondissementsgebied_2000, arrondissementsgebied_2001, arrondissementsgebied_2002, arrondissementsgebied_2003, arrondissementsgebied_2004, arrondissementsgebied_2005, arrondissementsgebied_2006, arrondissementsgebied_2007, arrondissementsgebied_2008, arrondissementsgebied_2009, arrondissementsgebied_2010, arrondissementsgebied_2011, arrondissementsgebied_2012, arrondissementsgebied_2013, arrondissementsgebied_2014, arrondissementsgebied_2015, arrondissementsgebied_2016, arrondissementsgebied_2017, arrondissementsgebied_2018, arrondissementsgebied_2019, arrondissementsgebied_2020, brandweerregio_1995, brandweerregio_1996, brandweerregio_1997, brandweerregio_1998, brandweerregio_1999, brandweerregio_2000, brandweerregio_2001, brandweerregio_2002, brandweerregio_2003, brandweerregio_2004, brandweerregio_2005, brandweerregio_2006, brandweerregio_2007, brandweerregio_2008, brandweerregio_2009, brandweerregio_2010, buurt_1995, buurt_1996, buurt_1997, buurt_1998, buurt_1999, buurt_2000, buurt_2001, buurt_2002, buurt_2003, buurt_2004, buurt_2005, buurt_2006, buurt_2007, buurt_2008, buurt_2009, buurt_2010, buurt_2011, buurt_2012, buurt_2013, buurt_2014, buurt_2015, buurt_2016, buurt_2017, buurt_2018, buurt_2019, buurt_2019_niet, buurt_2020, buurt_2020_niet, coropgebied_1995, coropgebied_1996, coropgebied_1997, coropgebied_1998, coropgebied_1999, coropgebied_2000, coropgebied_2001, coropgebied_2002, coropgebied_2003, coropgebied_2004, coropgebied_2005, coropgebied_2006, coropgebied_2007, coropgebied_2008, coropgebied_2009, coropgebied_2010, coropgebied_2011, coropgebied_2012, coropgebied_2013, coropgebied_2014, coropgebied_2015, coropgebied_2016, coropgebied_2017, coropgebied_2018, coropgebied_2019, coropgebied_2020, coropplusgebied_2005, coropplusgebied_2006, coropplusgebied_2007, coropplusgebied_2008, coropplusgebied_2009, coropplusgebied_2010, coropplusgebied_2011, coropplusgebied_2012, coropplusgebied_2013, coropplusgebied_2014, coropplusgebied_2015, coropplusgebied_2016, coropplusgebied_2017, coropplusgebied_2018, coropplusgebied_2019, coropplusgebied_2020, coropsubgebied_1995, coropsubgebied_1996, coropsubgebied_1997, coropsubgebied_1998, coropsubgebied_1999, coropsubgebied_2000, coropsubgebied_2001, coropsubgebied_2002, coropsubgebied_2003, coropsubgebied_2004, coropsubgebied_2005, coropsubgebied_2006, coropsubgebied_2007, coropsubgebied_2008, coropsubgebied_2009, coropsubgebied_2010, coropsubgebied_2011, coropsubgebied_2012, coropsubgebied_2013, coropsubgebied_2014, coropsubgebied_2015, coropsubgebied_2016, coropsubgebied_2017, coropsubgebied_2018, coropsubgebied_2019, coropsubgebied_2020, gemeente_1995, gemeente_1996, gemeente_1997, gemeente_1998, gemeente_1999, gemeente_2000, gemeente_2001, gemeente_2002, gemeente_2003, gemeente_2004, gemeente_2005, gemeente_2006, gemeente_2007, gemeente_2008, gemeente_2009, gemeente_2010, gemeente_2011, gemeente_2012, gemeente_2013, gemeente_2014, gemeente_2015, gemeente_2016, gemeente_2017, gemeente_2018, gemeente_2019, gemeente_2019_niet, gemeente_2020, gemeente_2020_niet, ggdregio_1995, ggdregio_1996, ggdregio_1997, ggdregio_1998, ggdregio_1999, ggdregio_2000, ggdregio_2001, ggdregio_2003, ggdregio_2004, ggdregio_2005, ggdregio_2006, ggdregio_2007, ggdregio_2008, ggdregio_2009, ggdregio_2010, ggdregio_2011, ggdregio_2012, ggdregio_2013, ggdregio_2014, ggdregio_2015, ggdregio_2016, ggdregio_2017, ggdregio_2018, ggdregio_2019, ggdregio_2020, grootstedelijke_agglomeratie_2000, grootstedelijke_agglomeratie_2001, grootstedelijke_agglomeratie_2002, grootstedelijke_agglomeratie_2003, grootstedelijke_agglomeratie_2004, grootstedelijke_agglomeratie_2005, grootstedelijke_agglomeratie_2006, grootstedelijke_agglomeratie_2007, grootstedelijke_agglomeratie_2008, grootstedelijke_agglomeratie_2009, grootstedelijke_agglomeratie_2010, grootstedelijke_agglomeratie_2011, grootstedelijke_agglomeratie_2012, grootstedelijke_agglomeratie_2013, grootstedelijke_agglomeratie_2014, grootstedelijke_agglomeratie_2015, jeugdregio_2015, jeugdregio_2016, jeugdregio_2017, jeugdregio_2018, jeugdregio_2019, jeugdregio_2020, kamervankoophandelregio_2008, kamervankoophandelregio_2009, kamervankoophandelregio_2010, kamervankoophandelregio_2011, kamervankoophandelregio_2012, kamervankoophandelregio_2013, kamervankoophandelregio_2014, kamervankoophandelregio_2015, kamervankoophandelregio_2016, kamervankoophandelregio_2017, kamervankoophandelregio_2018, kamervankoophandelregio_2019, kamervankoophandelregio_2020, landbouwgebied_1995, landbouwgebied_1996, landbouwgebied_1997, landbouwgebied_1998, landbouwgebied_1999, landbouwgebied_2000, landbouwgebied_2001, landbouwgebied_2002, landbouwgebied_2003, landbouwgebied_2004, landbouwgebied_2005, landbouwgebied_2006, landbouwgebied_2007, landbouwgebied_2008, landbouwgebied_2009, landbouwgebied_2010, landbouwgebied_2011, landbouwgebied_2012, landbouwgebied_2013, landbouwgebied_2014, landbouwgebied_2015, landbouwgebied_2016, landbouwgebied_2017, landbouwgebied_2018, landbouwgebied_2019, landbouwgebied_2020, landbouwgroep_1995, landbouwgroep_1996, landbouwgroep_1997, landbouwgroep_1998, landbouwgroep_1999, landbouwgroep_2000, landbouwgroep_2001, landbouwgroep_2002, landbouwgroep_2003, landbouwgroep_2004, landbouwgroep_2005, landbouwgroep_2006, landbouwgroep_2007, landbouwgroep_2008, landbouwgroep_2009, landbouwgroep_2010, landbouwgroep_2011, landbouwgroep_2012, landbouwgroep_2013, landbouwgroep_2014, landbouwgroep_2015, landbouwgroep_2016, landbouwgroep_2017, landbouwgroep_2018, landbouwgroep_2019, landbouwgroep_2020, landsdeel_1995, landsdeel_1996, landsdeel_1997, landsdeel_1998, landsdeel_1999, landsdeel_2000, landsdeel_2001, landsdeel_2002, landsdeel_2003, landsdeel_2004, landsdeel_2005, landsdeel_2006, landsdeel_2007, landsdeel_2008, landsdeel_2009, landsdeel_2010, landsdeel_2011, landsdeel_2012, landsdeel_2013, landsdeel_2014, landsdeel_2015, landsdeel_2016, landsdeel_2017, landsdeel_2018, landsdeel_2019, landsdeel_2020, nuts1_2003, nuts1_2006, nuts1_2010, nuts1_2013, nuts1_2016, nuts2_2003, nuts2_2006, nuts2_2010, nuts2_2013, nuts2_2016, nuts3_2003, nuts3_2006, nuts3_2010, nuts3_2013, nuts3_2016, politieregio_1995, politieregio_1996, politieregio_1997, politieregio_1998, politieregio_1999, politieregio_2000, politieregio_2001, politieregio_2002, politieregio_2003, politieregio_2004, politieregio_2005, politieregio_2006, politieregio_2007, politieregio_2008, politieregio_2009, politieregio_2010, politieregio_2011, politieregio_2012, politieregio_2013, provincie_1995, provincie_1996, provincie_1997, provincie_1998, provincie_1999, provincie_2000, provincie_2001, provincie_2002, provincie_2003, provincie_2004, provincie_2005, provincie_2006, provincie_2007, provincie_2008, provincie_2009, provincie_2010, provincie_2011, provincie_2012, provincie_2013, provincie_2014, provincie_2015, provincie_2016, provincie_2017, provincie_2018, provincie_2019, provincie_2020, regionaalmeld_coordinatiepunt_2017, regionaalmeld_coordinatiepunt_2018, regionaalmeld_coordinatiepunt_2019, regionaalmeld_coordinatiepunt_2020, regionale_eenheid_2014, regionale_eenheid_2015, regionale_eenheid_2016, regionale_eenheid_2017, regionale_eenheid_2018, regionale_eenheid_2019, regionale_eenheid_2020, regionale_energiestrategie_2018, regionale_energiestrategie_2019, regionale_energiestrategie_2020, regioplus_arbeidsmarktregio_2015, regioplus_arbeidsmarktregio_2016, regioplus_arbeidsmarktregio_2017, regioplus_arbeidsmarktregio_2018, regioplus_arbeidsmarktregio_2019, regioplus_arbeidsmarktregio_2020, ressort_2015, ressort_2016, ressort_2017, ressort_2018, ressort_2019, ressort_2020, rpagebied_2002, rpagebied_2003, rpagebied_2004, rpagebied_2005, rpagebied_2006, rpagebied_2007, rpagebied_2008, rpagebied_2009, rpagebied_2010, rpagebied_2011, rpagebied_2012, rpagebied_2013, rpagebied_2014, rpagebied_2015, rpagebied_2016, stadsgewest_2000, stadsgewest_2001, stadsgewest_2002, stadsgewest_2003, stadsgewest_2004, stadsgewest_2005, stadsgewest_2006, stadsgewest_2007, stadsgewest_2008, stadsgewest_2009, stadsgewest_2010, stadsgewest_2011, stadsgewest_2012, stadsgewest_2013, stadsgewest_2014, stadsgewest_2015, toeristengebied_1995, toeristengebied_1996, toeristengebied_1997, toeristengebied_1998, toeristengebied_1999, toeristengebied_2000, toeristengebied_2001, toeristengebied_2002, toeristengebied_2003, toeristengebied_2004, toeristengebied_2005, toeristengebied_2006, toeristengebied_2007, toeristengebied_2008, toeristengebied_2009, toeristengebied_2010, toeristengebied_2011, toeristengebied_2012, toeristengebied_2013, toeristengebied_2014, toeristengebied_2015, toeristengebied_2016, toeristengebied_2017, toeristengebied_2018, toeristengebied_2019, toeristengebied_2020, toeristengroep_2006, toeristengroep_2009, toeristengroep_2010, toeristengroep_2011, toeristengroep_2014, toeristengroep_2015, toeristengroep_2016, toeristengroep_2017, toeristengroep_2018, toeristengroep_2019, toeristengroep_2020, veiligheidsregio_2011, veiligheidsregio_2012, veiligheidsregio_2013, veiligheidsregio_2014, veiligheidsregio_2015, veiligheidsregio_2016, veiligheidsregio_2017, veiligheidsregio_2018, veiligheidsregio_2019, veiligheidsregio_2020, veiligthuisregio_2020, wijk_1995, wijk_1996, wijk_1997, wijk_1998, wijk_1999, wijk_2000, wijk_2001, wijk_2002, wijk_2003, wijk_2004, wijk_2005, wijk_2006, wijk_2007, wijk_2008, wijk_2009, wijk_2010, wijk_2011, wijk_2012, wijk_2013, wijk_2014, wijk_2015, wijk_2016, wijk_2017, wijk_2018, wijk_2019, wijk_2019_niet, wijk_2020, wijk_2020_niet, zorgkantoorregio_2009, zorgkantoorregio_2010, zorgkantoorregio_2011, zorgkantoorregio_2012, zorgkantoorregio_2013, zorgkantoorregio_2014, zorgkantoorregio_2015, zorgkantoorregio_2016, zorgkantoorregio_2017, zorgkantoorregio_2018, zorgkantoorregio_2019, zorgkantoorregio_2020.

14.2 List of all parameters available to the user

This section lists all parameters, which are available to the user, in alphabetical order. Many of these parameters are already documented in the manual above. If you want to make use of a parameter that is documented poorly (sorry for that), please <contact the author>.

  1. anakiwa_trans: not documented yet. The value is of type ‘string’. For the default style the value is #87d2ff20.
  2. area_stack_name: name that explains what the sum of the stacked areas means. The value is of type ‘string’. Figure(s) using ‘area_stack_name’: NL’ers hebben buitenlandse obligaties.
  3. author: put here the author if you don’t want to use the default. The value is of type ‘string’. Example(s): "r whoami::fullname()".
  4. axis_barplot_col: colour of extra axis in barplot. The value is of type ‘string’. For the default style the value is black. See also parameter(s): axis_barplot_lwd.
  5. axis_barplot_lwd: line width of axis at y = 0 in case of barplot. The value is of type ‘numeric’. For the default style the value is 1. See also parameter(s): axis_barplot_col.
  6. bar_gap_fraction: how much space you want between the bars of two consecutive x-points, where 0 means no gap, 1 means no bars. The value is of type ‘numeric’. Unit: ‘fraction’. Example(s): 0, 0.1. For the default style the value is 0.2. Figure(s) using ‘bar_gap_fraction’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
  7. bar_lab_big_mark_show: for the values in or above bars, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  8. bar_lab_col: color of the labels. The value is of type ‘string’. For the default style the value is black.
  9. bar_lab_font_size: leave empty for auto scaling. The value is of type ‘numeric’.
  10. bar_lab_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 1.
  11. bar_lab_n_decimals: the number of decimals the bar labels should get. The value is of type ‘numeric’. For the default style the value is 0.
  12. bar_lab_rotation: rotate the barplot labels. Zero (0) for horizontal. 90 for vertical. Leave empty for default (i.e. horizontal for labels on top of the bars, vertical for labels inside the bars). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 90. For the default style the value is [not set].
  13. bar_lab_show: you can show the value of the bar on top of it, or in its middle. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): bar_lab_n_decimals, bar_lab_top, bar_lab_increase_y_lim_2. Figure(s) using ‘bar_lab_show’: kansrijk.
  14. bar_lab_top: y means top, n means middle. The value is of type ‘bool’. For the default style the value is y.
  15. bar_stack_index: the position where the stacked bars should appear if you also have bars next to each other. Default is at the right. The value is of type ‘numeric’. Figure(s) using ‘bar_stack_index’: Number of phones in the world.
  16. bar_stack_name: name that explains what the sum of the stacked bars means. The value is of type ‘string’. Figure(s) using ‘bar_stack_name’: Number of phones in the world.
  17. base-settings-path: path to default settings file as shipped with the package. The value is of type ‘string’. Example(s): path/to/package/james-base-settings.xlsx. For the default style the value is ext/james-base-settings.xlsx.
  18. bg_col: background color in your figures. The value is of type ‘string’. For the default style the value is #eef8ff. For the kansrijk style the value is #ffffff.
  19. big_mark: big mark is put beween every 3 decimals before the decimal separator. The value is of type ‘string’. Example(s): . or ,. For the default style the value is .. For the english style the value is ,.
  20. box_col_all_equal: if y, all boxes get the same color. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘box_col_all_equal’: Kans om in risicogroep te zitten.
  21. box_col_per_group: usually you want one color per group (y). But you may choose to give each box its own color. The value is of type ‘bool’. For the default style the value is y.
  22. box_gap_fraction: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.2. For the box-plot style the value is 0.5.
  23. box_lab_big_mark_show: for the values (e.g. median) in box plots, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  24. box_median_col: if empty, same color as box. The value is of type ‘string’. Example(s): gray30. Figure(s) using ‘box_median_col’: Kans om in risicogroep te zitten.
  25. box_median_lab_font_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.7.
  26. box_median_lab_n_decimals: not documented yet. The value is of type ‘numeric’. For the default style the value is 2. Figure(s) using ‘box_median_lab_n_decimals’: Kans om in risicogroep te zitten.
  27. box_median_lab_show: not documented yet. The value is of type ‘bool’. For the default style the value is n. For the box-plot style the value is y. Figure(s) using ‘box_median_lab_show’: Kans om in risicogroep te zitten.
  28. box_median_line_extension_factor: put at zero to make length equal to box_width. The value is of type ‘numeric’. Unit: ‘fraction of box_width’. For the default style the value is 0.2.
  29. box_median_shape: 0 = line, rest is symbols like in R (try 19 for filled dot). The value is of type ‘numeric’. For the default style the value is 0. Figure(s) using ‘box_median_shape’: Kans om in risicogroep te zitten.
  30. box_median_shape_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.5.
  31. box_name_as_x_lab: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  32. box_quantiles: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0, .25, .5, .75, 1. Figure(s) using ‘box_quantiles’: Kans om in risicogroep te zitten.
  33. box_x: boxes are shown above this x-position. Leave empty for defaults. The value is a list with elements of the type ‘numeric’ separated by ‘,’.
  34. cache: use caching mechanism to prevent the re-creation of the exact same figure if you rerun James. The value is of type ‘bool’. For the default style the value is y.
  35. caption: caption if used in Markdown report. The value is of type ‘string’. Example(s): This text explains what you see In the figure.. Figure(s) using ‘caption’: Bestaande koopwoningen, A discontinuity.
  36. cbs_url: on cbs.nl, find data and click ‘share’. Copy/paste the share-url here. The value is of type ‘string’. Figure(s) using ‘cbs_url’: Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen.
  37. col_order: change color order. You may reuse colors as is show in the example. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 3, 1, 1, 2, 2. Figure(s) using ‘col_order’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
  38. color: holds the resulting colors in the same order as they are needed during the plotting phase. If you don’t specify its values, the variable will be automatically set during the pre-processing phase based on palette, highlighting, etc. The value is a list with elements of the type ‘string’ separated by ‘,’.
  39. cpb: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado. See also parameter(s): palette.
  40. cpb_3: this palette is used when you have 1, 2 or three time seris in your data and palette is set to ‘auto’. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is endeavour, rose, brown. See also parameter(s): palette, cpb.
  41. cpb_lib_version: use this version of CPB packages The value is of type ‘string’. For the default style the value is cpb_2.
  42. create: using this parameter you can temporarily disable the creation of a figure. James creates figures if and only if this value is y. The default is y, unless a report is generated, in which case the value is set to n. However, if you set ‘create = n’ for the report, then the default is y again. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): filter. Figure(s) using ‘create’: Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen.
  43. custom: your parameters are available as p$parameter. You have acces to your data as follows. The x-values are in p$data[, 1]. The first time series is p$data[, 2], the second is p$data[, 3], etc. If you generate figures from R (i.e. not Excel), you may define a function ‘custom <- function(p) { … }’ with a custom implementation instead. The value is of type ‘string’. Example(s): lines(p$data[, 1], mean(p$data[, 2:3])). Figure(s) using ‘custom’: Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Older workers more productive?.
  44. data: not documented yet. The value is of type ‘data.frame’.
  45. date: what you want as date. You may use the example if you want today’s date. The value is of type ‘string’. Example(s): "r format(Sys.Date())".
  46. debug: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  47. decimal_mark: decimal separator. The value is of type ‘string’. Example(s): . or ,. For the default style the value is ,. For the english style the value is ..
  48. destination_path: not documented yet. The value is of type ‘path’. For the default style the value is ./generated.
  49. dot_lwd: line width for drawing symbols such as dots/diamonds. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1.
  50. dot_shape: there are over 20 symbols you can choose from; they are all shown in one of the figures in the manual. There are two types of alternatives to the shapes. Firstly, you can use ‘.’ (a period) to specify very small dots. Secondly, you can use a single character (e.g. a letter, digit or sign (e.g. a, 1, or %)). The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 19. For the ppower style the value is .. Figure(s) using ‘dot_shape’: Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen.
  51. dot_size: size of symbol, c.q. dot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘dot_size’: Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s.
  52. draft: lowers resolution of png and jpg to 150 ppi to save creation time. This results in less sharp figures. Please beware that 150 ppi is below the standard for publication, which is 600 ppi. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): resolution, lock.
  53. fan: color palette tailored for fan charts starting with line, fan1, fan2, fan3 and followed by any other series. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is rose, anakiwa, cerulean, endeavour. See also parameter(s): palette.
  54. file: base file name of figure, id est, before the suffix .jpg, .pdf, .png or .svg is added. The value is of type ‘string’. Example(s): my-beautiful-figure. See also parameter(s): file_correct_name.
  55. file_correct_name: replace special characters, punctuation, white spaces, underscore with a dash (-). The value is of type ‘bool’. For the default style the value is y. See also parameter(s): file.
  56. filter: filter that is used when importing data. The value is of type ‘string’. For the default style the value is create.
  57. first_col_grouping: this parameter defines whether or not the first column in the data tab represents normal x-values (first_col_grouping = n) or whether it contains group names for the x-values (first_col_grouping = y). If you don’t set this parameter, James tries to guess the value of this parameter as follows. If the second column contains at least one character (i.e. a non-numeric value), first_col_grouping will be set to y automatically. Otherwise it is set to n automatically. You can overrule the automatic settings by setting this parameter by hand. This may happen if the values on the x-axis are numerical. The value is of type ‘bool’.
  58. first_row_grouping: this parameter is for boxes only. See section box plot. It defines whether or not the first row in your data tab contains group names of your time series box plot. Boxes can be grouped, which gives the boxes in the same group the same ‘header’ (and the same color if you want to). You should put the group names in the first row, i.e. above the time series names. In most cases you don’t have to set this parameter manually as James will automatically set the value of parameter first_row_grouping = y if any of the time series comprises a character. If James erroneously puts group names above your boxes, you can manually overrule this by setting first_row_grouping = n. The value is of type ‘bool’.
  59. font: the font of all the text in your figure. The value is of type ‘string’. Example(s): RijksoverheidSansText, sans, serif, mono, avenir. For the default style the value is RijksoverheidSansText.
  60. font_path: gives path to font, dependent on platform (i.e. windows, linux, osx) The value is of type ‘r’. Example(s): M:/p_james/fonts/. For the default style the value is fix_path_rel("fonts", path_base = "p_james").
  61. font_size: size of a point in terms of pixels (for png). Vector graphics (pdf, svg) scaled accordingly. If you don’t set this value, James will set the value dependent on the resolution. For a resolution of 150 ppi, the point size is set to 7 pixels. Point size for other resolutions is scaled proportionally. The value is of type ‘numeric’. Unit: ‘pixels’. For the default style the value is 7.
  62. footnote: footnote, placed at bottom of figure, aligned right by default. The value is of type ‘string’. Example(s): ¹this is a footnote. Figure(s) using ‘footnote’: Six different line types, Oversterfte in 2020, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Bestaande koopwoningen, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Standard normal distribution, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Toeslagen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, VMBO, Two series of whiskers in one plot.
  63. footnote_align: to which side you want to align your footnote horizontally. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is right. Figure(s) using ‘footnote_align’: Toeslagen.
  64. footnote_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘footnote_col’: Six different line types, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Toeslagen, VMBO.
  65. footnote_font_size: size of footnote text. The value is of type ‘numeric’. For the default style the value is 0.85.
  66. footnote_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘footnote_font_style’: Toeslagen.
  67. footnote_side: to which side you want to align your footnote vertically. The value is of type ‘string’. Example(s): bottom, top. For the default style the value is bottom. Figure(s) using ‘footnote_side’: Toeslagen.
  68. footnote_x: distance from left/right side of figure. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.25.
  69. footnote_y: distance from bottom/top of figure. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.15.
  70. force_y_at: normally James adds whitespace around the graph (see parameter empty_fraction_plot). You can force James to put the gridlines at precisely y_at (value: y). Otherwise (value: n) James will add extra gridlines if necessary. The value is of type ‘bool’. For the default style the value is n.
  71. forecast_below_gridline: text above or below upper gridline. The value is of type ‘bool’. For the default style the value is y.
  72. forecast_bg_col: background color for forecasting. The value is of type ‘string’. For the default style the value is #ffffff.
  73. forecast_bg_show: show background color behind forecasted part of series. The value is of type ‘bool’. For the default style the value is y.
  74. forecast_col_transparency: forecasted areas/bars have this transparency level. Zero means no transparancy, one means full transparancy. PLEASE REMOVE THIS PARAMETER. NO LONGER USED. WE NOW ‘shade’ BARS/AREAS The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.7. For the default style the value is 0.
  75. forecast_font_size: size of forecast_text. The value is of type ‘numeric’. For the default style the value is 0.9.
  76. forecast_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  77. forecast_shading_angle: slope of shading lines, given as an angle (counter-clockwise). The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90, 135. For the default style the value is 45.
  78. forecast_shading_col: color of forecast shading. Default color is background color of the figure. The value is of type ‘string’. For the default style the value is bg_col.
  79. forecast_shading_col_transparency: transparency of shading. The value is of type ‘numeric’. Unit: ‘fraction (0..1]’. Example(s): 0.3, 0.5, 0.65. For the default style the value is 0.65.
  80. forecast_shading_density: density of shading of areas and bars that are forecasted. The value is of type ‘numeric’. Unit: ‘cm^-1’. Example(s): 5, 10, 20. For the default style the value is 10.
  81. forecast_shading_show: by default shading is added to forecasted bars/areas. The value is of type ‘bool’. For the default style the value is n.
  82. forecast_text: text that marks the start of the forecast. The value is of type ‘string’. For the default style the value is raming. For the english style the value is prognosis.
  83. forecast_text_col: color of the forecast_text. The value is of type ‘string’. For the default style the value is brown.
  84. forecast_text_show: add text at top of plot (or right side for turned plots) to mark start of forecast. The value is of type ‘bool’. For the default style the value is y.
  85. forecast_x: the x-value (usually a date) that separates observed values from predicted values. The value is of type ‘numeric’. Figure(s) using ‘forecast_x’: Bbp tijdens crises, Forecasted from 1958, Geraamd vanaf 1958.
  86. formula: append outcome of formula after last column to data. Please note, your data x-values are in p$data[, 1]. The first series’ values are in p$data[, 2], the second in p$data[, 3] and so on. So, the example determines the mean of the first and second series. The value is of type ‘string’. Example(s): rowMeans(p$data[, 2:3]). Figure(s) using ‘formula’: Hello World.
  87. formula_name: legend name of formula. The value is of type ‘string’. Example(s): sinus. Figure(s) using ‘formula_name’: Hello World.
  88. geo_border_col: not documented yet. The value is of type ‘string’. Example(s): black. For the default style the value is gray.
  89. geo_border_lwd: not documented yet. The value is of type ‘numeric’. Example(s): 1. For the default style the value is 0.5.
  90. geo_cbs_available_maps: not documented yet. The value is of type ‘path’. For the default style the value is ext/geo/cbs-maps.RData.
  91. geo_cbs_map: this parameter specifies a specific division of The Netherlands in regions. See appendix of manual for the full list of options currently available. The value is of type ‘string’. Example(s): arbeidsmarktregio_2018. Figure(s) using ‘geo_cbs_map’: geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
  92. geo_cbs_url_base: first part of url that is used to download geographic data originating from CBS. Please edit the url if you need to. The value is of type ‘string’. For the default style the value is https://geodata.nationaalgeoregister.nl/cbsgebiedsindelingen/wfs?request=GetFeature&service=WFS&version=2.0.0&outputFormat=json&typeName=cbs_.
  93. geo_cbs_url_centroid: part of url that is pasted after the region name (for centroids so labels can be placed). The value is of type ‘string’. For the default style the value is _labelpoint.
  94. geo_cbs_url_polygon: part of url that is pasted after the region name (for polygons). The value is of type ‘string’. For the default style the value is _gegeneraliseerd.
  95. geo_col_threshold: the order of the values of this parameter correspond to the order of the colors in your palette. Regions with the first (second, third, etc.) value will get the first (second, third, etc.) color from your palette. Regions with other values will be be colored by linear interpolation of the colors in your palette. Regions with values outside the range of this parameter will get the figure’s background color. The values in this parameter must be stricktly increasing. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): palette, palette_blue. Figure(s) using ‘geo_col_threshold’: Arbeidsmarktregio’s in 2020 volgens CBS.
  96. ghostscript_executable_windows: used to put font in pdf. Full path (2020-01-19) is s:/Applicaties/CPB/GS/bin/gswin64.exe The value is of type ‘path’. For the default style the value is gs -version=9.52.
  97. gif: export figure as gif. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
  98. gif_delay: delay between frames in gif. The value is of type ‘numeric’. Unit: ‘s’. For the default style the value is 0.1. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
  99. gif_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  100. gif_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  101. gif_loop: loop gif. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
  102. gif_n_frames: number of frames in gif. The value is of type ‘numeric’. For the default style the value is 20. See also parameter(s): gif_n_frames, gif_delay, gif_loop, png.
  103. gif_pngs: the series of png’s that is used for the gif. The value is a list with elements of the type ‘path’ separated by ‘,’.
  104. globals: not documented yet. The value is of type ‘data.frame’.
  105. grid_lines_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  106. grid_lines_lwd: line width. The value is of type ‘numeric’. For the default style the value is 0.25.
  107. group: names of groups. If given, number of elements should equal number of time series. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): group-1;; group-2;; group-2. See also parameter(s): first_row_grouping, box_col_per_group, name.
  108. group_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  109. group_font: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 2.
  110. group_font_size: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  111. group_spacing: extra space between groups. The value is of type ‘numeric’. Example(s): 0, 0.5, 1, 2. For the default style the value is 0. Figure(s) using ‘group_spacing’: VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  112. group_x: the x-positions of the group names. James will set them automatically if not specified by user. Please beware that the group names should be placed at different positions, dependent on the orientation of your plot (i.e., turn = y or turn = n). The value is a list with elements of the type ‘numeric’ separated by ‘,’.
  113. hash_dir: path to hashes. The value is of type ‘path’. For the default style the value is ./generated/cache.
  114. hash_p: hash of (meta) data before preprocessing starts. The value is of type ‘string’.
  115. height: height of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 7. For the big style the value is 15. For the slide style the value is 11.7. For the slide-wide style the value is 11.7. For the tall style the value is 15.5. For the world-map style the value is 8.5. For the world-map-www style the value is 9.
  116. highlight_col: for highlighting a time series. The value is of type ‘string’. Example(s): #ffa500. For the default style the value is rose. Figure(s) using ‘highlight_col’: Number of phones (Europe yellow).
  117. highlight_series: time series you want to highlight. The value is of type ‘numeric’. Figure(s) using ‘highlight_series’: Number of phones (Europe yellow), Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen.
  118. highlight_x: if you want to highlight a time series of type ‘bar’, with this parameter you can narrow the highlight to only one given x-position. The x-position specified here, is interpreted as a number (only if all values on the x-axis are numbers) or as a string (if at least one of the values on the x-axis is a string). Obviously, you can highlight more than one value (of one and the same time series). The value is a list with elements of the type ‘string’ separated by ‘;;’. Unit: ‘x’. Example(s): bbp. Figure(s) using ‘highlight_x’: Europese steunpakketten.
  119. hist_breaks: number of cells (bars) you want in the histogram. If you leave this empty, James will do an educated guess. The value is of type ‘numeric’. Example(s): 10.
  120. hist_freq: if y, the histogram graphic is a representation of frequencies (i.e. counts). If n, probability densities are plotted so that the histogram has a total area of one if you set bar_gap_fraction = 0. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): bar_gap_fraction.
  121. hline_bold: by default the lowest gridline is bold. Except if your plot contains bars and zero is visible, then the default is zero. If you want the bold line(s) to appear at other places, you can specify the(ir) y-value(s) here. The value is of type ‘numeric’. For the ppower style the value is 0. Figure(s) using ‘hline_bold’: Hello World, Bbp tijdens crises, Partly dashed line, Oversterfte in 2020, VWO, VWO, trend-vs-niveau.
  122. hline_bold_col: line color. The value is of type ‘string’. For the default style the value is black.
  123. hline_bold_lwd: line width. The value is of type ‘numeric’. For the default style the value is 1.
  124. hline_dash: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘hline_dash’: Kans om in risicogroep te zitten, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Two series of whiskers in one plot.
  125. hline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  126. hline_dash_lty: not documented yet. The value is of type ‘numeric’. For the default style the value is 3.
  127. hline_dash_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  128. id: unique identifier that can be used for plotting in reports (plot(id), or plot(“my-file.xlsx”, id = “nice-fig”)). In addition, it can be used to distinguish two different figures in the same xlsx file, that share one and the same data tab. The value is of type ‘string’.
  129. install_local: y: local installation; n: remote installation The value is of type ‘bool’. For the default style the value is n.
  130. install_root_remote_prod_use_time_rs: not documented yet. The value is of type ‘path’. For the default style the value is /cifs/p_james/release.
  131. install_status_production: y: production; n: development The value is of type ‘bool’. For the default style the value is y.
  132. james_publish_bat_path: not documented yet. The value is of type ‘r’. For the default style the value is paste0("james-publish-", get_param("james_version"), ".bat").
  133. james_publish_path_on_m: not documented yet. The value is of type ‘r’. For the default style the value is file.path(get_param("install_root_remote_prod_use_time"), get_param("james_version"), get_param("james_publish_Rscript")).
  134. james_publish_Rscript: not documented yet. The value is of type ‘string’. For the default style the value is james-publish.R.
  135. james_server_2: not documented yet. The value is of type ‘string’. For the default style the value is james-l02p.
  136. james_server_2_path: not documented yet. The value is of type ‘r’. For the default style the value is paste0(get_param("james_server_2"), "-", get_param("james_version"), ".bat").
  137. james_sh_path: not documented yet. The value is of type ‘r’. For the default style the value is paste0("james-", get_param("james_version"), ".sh").
  138. james_version: james version. Standard format: dev-yyyy-mm-dd (dev = development stage, yyyy = four digit calendar, mm = two digit month, dd = two digit day of month). The value is of type ‘string’. For the default style the value is 2022-06-18.
  139. james_windows: not documented yet. The value is of type ‘string’. For the default style the value is james-windows.
  140. james_windows_path: not documented yet. The value is of type ‘r’. For the default style the value is paste0(get_param("james_windows"), "-", get_param("james_version"), ".bat").
  141. jid: not documented yet. The value is of type ‘string’.
  142. jpg: export figure as jpeg. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): pdf, png, jpg, svg, gif, r_plot.
  143. jpg_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  144. jpg_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  145. kansrijk: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is cerulean, flirt, sun, scarlet_gum, apple, leather, kaitoke_green, wewak. See also parameter(s): palette.
  146. kmev2021: not documented yet. The value is of type ‘path’. For the default style the value is ext/report/kmev2021/james-kmev2021.xlsx.
  147. kmev2021_result: not documented yet. The value is of type ‘path’. For the default style the value is ext/report/kmev2021/james-kmev2021.html.
  148. label: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘;;’.
  149. label_align: 0: alignment at given coordinates, 1: below, 2: left, 3: above, 4: right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, 3, 4. For the default style the value is 4.
  150. label_col: label colour. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black.
  151. label_font_size: relative to font size of title. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1. Figure(s) using ‘label_font_size’: Overlapping labels (NL, PT), Different alignment for PT.
  152. label_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  153. label_offset: distance (‘offset’) of the text label from the specified coordinate in fractions of the width of the letter ‘m’. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0.5.
  154. label_rotation: the rotation of the label in degrees counterclockwise. Zero (0) means horizontal, 90 means vertical. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 45, 90. For the default style the value is 0.
  155. label_series_n: the number of the time series that you want to label. The value is of type ‘numeric’. For the default style the value is 1.
  156. labels_margin_add_for_groups: minimal distance between group name and series name. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.
  157. labels_margin_left: margin left of title, y_title, y_lab. Same margin is used at right side of main title if it is automatically rescaled if it grows to wide. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.45.
  158. labels_margin_right: margin right of x_title. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.45.
  159. latest-version-txt-file: not documented yet. The value is of type ‘string’. For the default style the value is latest-version.txt.
  160. legend_column_space: space between columns in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.375.
  161. legend_dot_col_trans: if a dot is transparent in the figure, should it be transparent in legend too? The value is of type ‘bool’. For the default style the value is n.
  162. legend_font_size: relative font size in legend. The value is of type ‘numeric’. For the default style the value is 1.
  163. legend_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  164. legend_forecast_show: added shaded block with dashed line to legend if forecast_x is set. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): forecast_x.
  165. legend_forecast_text: forecast in right language. The value is of type ‘string’. For the default style the value is start raming. For the english style the value is prognosis.
  166. legend_line_distance: space between lines in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.315.
  167. legend_n_per_column: number of time series names per column in legend. The value is of type ‘numeric’. Example(s): 1, 4. For the default style the value is 3. For the fan style the value is 4. For the ppower style the value is 4. Figure(s) using ‘legend_n_per_column’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal), VMBO, Verwacht verlies in verschillende scenario’s.
  168. legend_order: use this to shuffle order or make selection (example shows only series 1, 3 and 5). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 3, 5. Figure(s) using ‘legend_order’: Partly dashed line, NL’ers hebben buitenlandse obligaties, Cohorten omvatten veel asielmigranten, Participatie gemeenten, Two series of whiskers in one plot.
  169. legend_show: put at n if you don’t want a legend. Doing so will keep the rest of the figure unchanged. If you want to make use of the space that emerges from hiding the legend, you can set ‘style = no-legend’. The value is of type ‘bool’. For the default style the value is y. For the no-legend style the value is n. See also parameter(s): style.
  170. legend_space_symbol_txt: space between symbol and text. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.15.
  171. legend_symbol_height: not documented yet. The value is of type ‘numeric’. Unit: ‘fraction of legend_line_distance’. For the default style the value is 0.8. See also parameter(s): legend_line_distance.
  172. legend_symbol_width: width of symbol in legend. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.3.
  173. legend_x: position of left side of legend. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.03. For the default style the value is 0.45.
  174. legend_y: position of top of legend, seen from bottom of figure. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 0.12. For the default style the value is 1.3. For the map style the value is 1.08. Figure(s) using ‘legend_y’: VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Impact no-deal Brexit (horizontal).
  175. light_green: not documented yet. The value is of type ‘string’. For the default style the value is #81CB7A.
  176. light_rose: not documented yet. The value is of type ‘string’. For the default style the value is #FCCAD6.
  177. lightest_green: not documented yet. The value is of type ‘string’. For the default style the value is #CEEAC9.
  178. line_distance: the line height multiplier. Distance between lines if you use a newline. A newline is a backslash, directly followed by the letter n. The value is of type ‘numeric’. Unit: ‘a.u.’. Example(s): 0.8. For the default style the value is 0.8.
  179. line_lty: line type (1: continuous; 2, 3, … have dashes). For dashes the advice is to use 3. Please beware that the forecasted part of a line is automatically dashed, unless you specify this parameter. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 1, 3, 1 if the third line is dashed. For the default style the value is 1. See also parameter(s): line_obs_fc_lty. Figure(s) using ‘line_lty’: Six different line types, Partly dashed line, Two bandwiths in one plot, Oversterfte in 2020, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, trend-vs-niveau.
  180. line_lty_correct_pdf_and_svg: auto-fix dashed lines in pdf and svg. The advice in *.gif/jpg/png is to use ‘line_lty = 3’ for dashed lines. In pdf/svg the intended dashes show up as small dots instead. This can be solved by replacing ‘line_lty = 3’ with ‘line_lty = 2’ for pdf/svg. The value is of type ‘bool’. For the default style the value is y.
  181. line_lwd: time series line width. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1.5.
  182. line_obs_fc_lty: line types of observed respectively forecasted data. Please use the default settings. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1, 1. See also parameter(s): line_lty.
  183. line_symbol: add a symbol to your line. This may be e.g. a dot (1, 19, 20) or a diamond (18). The symbol will be added at the data points that define your line. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 1, 2, …, 23. For the default style the value is 0. See also parameter(s): dot_shape. Figure(s) using ‘line_symbol’: Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe.
  184. line_symbol_col: color of the symbols that decorate your line. The colors default to the line color. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): endeavour, anakiwa, rose, mauvelous, brown, cold_turkey, siren, biscay, dorado, sun. Figure(s) using ‘line_symbol_col’: Number of phones US vs. Europe.
  185. line_symbol_size: size of symbol. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1.
  186. lock: this locks the parameters specified by the ‘locked_settings’ parameter for the user. In addition, the scaling of fonts is disabled if lock = yes. On top of that, styles no-legend and no-title are forbidden too, if lock = yes. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): locked_settings.
  187. locked_settings: the list of parameters that are locked to the user. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is draft, resolution, legend_show, footnote_col, footnote_x, footnote_y, footnote_side, footnote_align, footnote_font_style, footnote_font_size, palette. See also parameter(s): lock, resolution, legend_show, footnote_col, footnote_x, footnote_y, footnote_side, footnote_align, footnote_font_style, footnote_font_size, palette.
  188. logo: shows CPB-logo above figure. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘logo’: Forecasted from 1958, Geraamd vanaf 1958, Violent crime rates in the USA.
  189. logo_file: file that holds your logo. The value is of type ‘path’. For the default style the value is ext/img/rijkslogo.png.
  190. logo_height: height logo should have in the figure. Width is auto-scaled. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 1.
  191. logo_text_en: english text next to logo. The value is of type ‘string’. For the default style the value is CPB Netherlands Bureau for\nEconomic Policy Analysis.
  192. logo_text_nl: dutch text next to logo. The value is of type ‘string’. For the default style the value is Centraal Planbureau.
  193. lsfit_series: adds least squares fit to this/these series. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1.
  194. manual_file_name: not documented yet. The value is of type ‘r’. For the default style the value is paste0("james-", get_param("james_version"), "-manual.html").
  195. manual_R_example_path: not documented yet. The value is of type ‘path’. For the default style the value is examples/R.
  196. manual_xlsx_example_path: not documented yet. The value is of type ‘path’. For the default style the value is examples/xlsx.
  197. manual_xlsx_input_file: not documented yet. The value is of type ‘path’. For the default style the value is ./james-manual.xlsx.
  198. margin_east: margin right of plotting area. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.635. For the map style the value is 0.5. For the world-map style the value is 0. For the world-map-www style the value is 0.
  199. margin_east_extra: extra margin for right y-axis. The value is of type ‘numeric’. Unit: ‘cm’.
  200. margin_north: margin above plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.524. For the default style the value is 1.3. For the box-plot style the value is 0.95. For the map style the value is 0.8. For the world-map style the value is 0.5. For the world-map-www style the value is 1. For the no-title style the value is 0.7.
  201. margin_north_extra: not documented yet. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0. For the x-top style the value is 0.2.
  202. margin_south: margin below plotting area. The value is of type ‘numeric’. Unit: ‘cm’. Example(s): 1.905. For the default style the value is 2.3. For the slide-wide style the value is 2.8. For the map style the value is 1.5. For the world-map style the value is 0. For the world-map-www style the value is 0. For the no-legend style the value is 1.25. For the interactive style the value is 3.
  203. margin_west: set automatically for most styles. Sum of maximum width of your labels, plus margin_west_delta. The value is of type ‘numeric’. Unit: ‘cm’. For the map style the value is 0.5. For the world-map style the value is 0. For the world-map-www style the value is 0.
  204. margin_west_delta: this is added to margin_west. margin_west is dynamically calculated based on actual width of your y_lab‘s, the labels_margin_left and y_lab_margin_right. This is to guarantee identical alignment of all your labels at the left side of the plot. The value is of type ’numeric’. Unit: ‘fraction of width’. For the default style the value is 0. For the interactive style the value is -0.04.
  205. name: names of the individual time series. These overwrite the series names in the headers of the data sheet and thus also in the legend. Beware: use ;; as separator between names. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp;; inflation;; interest. Figure(s) using ‘name’: Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten.
  206. name_col: this way you can assign specific colors to specific time series, to ensure each series has one color in different figures. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp = blue;; inflation = yellow;; interest = pink. Figure(s) using ‘name_col’: Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Arbeidsmarktregio’s in 2020 volgens CBS.
  207. open: opens the figure after creation. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘open’: report.
  208. order: select subset of time series you want to plot. You can also change the order (see example). Please note: the ordering is the very first action (before scaling). It’s the same as re-ordering the columns in your data tab, yourself. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 4, 2. Figure(s) using ‘order’: Number of phones US vs. Europe, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Bestaande koopwoningen, Violent crime rates in the USA.
  209. order_name: same as parameter ‘order’ but with time series names instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): bbp;; inflation;; interest.
  210. palette: this parameter defines the colors of your time series, assigned in the order of appearance. James evaluates its elements in a recursive manner. Meaning, if the color itself is a parameter (e.g. ‘cpb’ or ‘kansrijk’), James will replace it with its parameter value. The values will be evaluated in turn. If a value is a parameter that refers directly to a color (e.g. ‘sun’ = #fbad1d), then it eventually will be replaced by its hex triplet. So, you can combine palettes, color names and hex triplets in any order when defining a palette. You can make a color transparent by appending two hexadecimal numbers to the hex triplet (e.g. #ff0000 is red, and #ff000088 is semi-transparent red). These two numbers indicate the degree of opacity (i.e. 00 means fully transparent, FF means fully opaque). The default value ‘auto’ chooses the palette based on the number of time series you have: for 1, 2 or 3, palette cpb_3 is chosen, for 4 or more, palette cpb is chosen for aesthetic reasons. Please note that the 0’s are zero’s here. Unfortunately, the main font in this manual does not clearly distinguish a zero and the letter o. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): yellow, cpb, #FF0011, appletv. For the default style the value is auto. For the kansrijk style the value is kansrijk. For the fan style the value is fan. For the ppower style the value is ppower. For the map style the value is palette_map. For the world-map style the value is palette_world_map. Figure(s) using ‘palette’: Partly dashed line, Oversterfte in 2020, Groeibijdragen bestedingen, Arbeidsmarktregio’s in 2020 volgens CBS, Coloring many series in a clear and unique fashion is challenging.
  211. palette_map: example of a palette with only two blue colors; light one first, dark one second. You can use this palette to auto-generate a gradient of colors for e.g. regions with different values that based on the value each need a different color interpolated from a palette as this. The palette may contain more than two values. The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘hex colors or color names’. Example(s): anakiwa, endeavour, rose. For the default style the value is endeavour, anakiwa. See also parameter(s): palette.
  212. palette_world_map: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is rose, mauvelous, light_rose, lightest_green, light_green, apple.
  213. pandoc_location_windows: not documented yet. The value is of type ‘path’. For the default style the value is S:/Applicaties/CPB/pandoc.
  214. pandoc_location_windows_bat: not documented yet. The value is of type ‘path’. For the default style the value is S:\Applicaties\CPB\pandoc.
  215. parallel: parallel processing The value is of type ‘bool’. For the default style the value is n.
  216. path_root_linux: not documented yet. The value is of type ‘path’. For the default style the value is /cifs.
  217. path_root_osx: not documented yet. The value is of type ‘path’. For the default style the value is /Volumes.
  218. path_root_windows: not documented yet. The value is of type ‘path’. For the default style the value is m:.
  219. pdf: export figure as pdf. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): pdf, png, jpg, svg, gif, r_plot.
  220. pdf_dir: destination directory for your pdf’s. Use / as separator. The value is of type ‘path’. For the default style the value is ..
  221. pdf_file: sets path/to/location/with-file-name.pdf. If you leave the parameter empty, it defaults to destination_path/pdf_path/file.pdf. The value is of type ‘path’. See also parameter(s): file.
  222. plot_order: plot functions are called in this order. You may overwrite a function if you want to customize it. Alternatively, if you want to add your own custom plotting function to James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is format_labs_set_margin_west, set_layout_and_init_plot, set_line_distance, forecast_bg, shading, rectangle, axes, gridlines, area_stack, area, bars, extra_axis_barplot, jbox, dot, linez, linez_lsfit, whisker, label, shading_suppress, custom, user_line, text_label, forecast, margins_0000, j_legend, titles, footnote, logo.
  223. plot_order_geo: plot functions are called in this order. You may overwrite a function if you want to customize it. Alternatively, if you want to add your own custom plotting function to James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is geo_init_plot, set_line_distance, geo_plot, margins_0000, j_legend, titles, footnote, logo.
  224. plot_order_world: plot functions are called in this order. You may overwrite a function if you want to customize it. Alternatively, if you want to add your own custom plotting function to James, please insert its name in this list. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is world_map_init_plot, set_line_distance, world_map_plot, margins_0000, titles, world_map_title_www, footnote, logo.
  225. png: export figure as png. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): pdf, png, jpg, svg, gif, r_plot.
  226. png_dir: not documented yet. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  227. png_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  228. ppower: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is anakiwa_trans, endeavour, rose, brown.
  229. preprocess_first(p): this function first scales your data (if p$scale != 1), then it removes data outside user p$x_lim, p$y_lim. It puts x-values in p$x and y-values in p$y. The value is of type ‘string’.
  230. preprocess_order: these functions are called in this order before plotting. You may add a new function, by extra_preprocessing(p), where both “james” == class(p) and “james” == class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is add_style, preprocess_data_grouping_variables, validate, draft, append_formula, data_operations, preprocess_first, replicate_params, forecast_pre, label_pre, area_stack_pre, hist_pre, bars_pre, whisker_pre, box_pre, dot_pre, linez_pre, area_pre, color_pre, legend_pre, set_lims, set_labs, find_y_r_scaling, logo_pre.
  231. preprocess_order_geo: these functions are called in this order before plotting. You may add a new function, by extra_preprocessing(p), where both “james” == class(p) and “james” == class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is geo_init, geo_validate, geo_pre, logo_pre.
  232. preprocess_order_world: these functions are called in this order before plotting. You may add a new function, by extra_preprocessing(p), where both “james” == class(p) and “james” == class(extra_preprocessing(p)). The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is world_map_pre, world_map_projection, logo_pre.
  233. project_folder: not documented yet. The value is of type ‘path’. For the default style the value is p_james/release.
  234. quality: for jpg only. The value is of type ‘numeric’. Unit: ‘%’. For the default style the value is 75.
  235. quiet: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  236. r_plot: create a plot directly in R. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): pdf, png, jpg, svg, gif, r_plot.
  237. r_version: use this R version The value is of type ‘string’. For the default style the value is 4.1.3.
  238. rect_border: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Figure(s) using ‘rect_border’: Different alignment for PT.
  239. rect_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is #ff001188. Figure(s) using ‘rect_col’: Overlapping labels (NL, PT), Different alignment for PT.
  240. rect_xleft: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_xleft’: Overlapping labels (NL, PT), Different alignment for PT.
  241. rect_xright: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_xright’: Overlapping labels (NL, PT), Different alignment for PT.
  242. rect_ybottom: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_ybottom’: Overlapping labels (NL, PT), Different alignment for PT.
  243. rect_ytop: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘rect_ytop’: Overlapping labels (NL, PT), Different alignment for PT.
  244. region_label_col: not documented yet. The value is of type ‘string’. Example(s): white. For the default style the value is black.
  245. region_label_font_size: relative font size. The value is of type ‘numeric’. Example(s): 0.7, 1.5. For the default style the value is 1.
  246. region_label_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is of type ‘numeric’. Example(s): 1, 2, 3, 4. For the default style the value is 3.
  247. report_default_data_show: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  248. report_default_fig_show: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  249. report_default_file: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/james-report-default.Rmd.
  250. report_default_param_show: not documented yet. The value is of type ‘bool’. For the default style the value is n.
  251. report_dir: not documented yet. The value is of type ‘path’. For the default style the value is report.
  252. report_file: not documented yet. The value is of type ‘path’.
  253. report_format: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): html, pdf, word, ioslides, slidy, beamer, powerpoint. For the default style the value is html.
  254. report_include_james_appendix: not documented yet. The value is of type ‘bool’. For the default style the value is y. Figure(s) using ‘report_include_james_appendix’: report.
  255. report_james_appendix_path: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/james-appendix.Rmd.
  256. report_place_files_in_input_dir: when creating a report, you can use this variable to indicate which files you want to have copied to the subdir ‘input/’ so you can access them easily. The value is a list with elements of the type ‘path’ separated by ‘,’.
  257. report_show: specify what you want in the header of your report. Please choose at least one. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is title, author, date.
  258. report_table_of_content: not documented yet. The value is of type ‘bool’. For the default style the value is y.
  259. report_text: you can put your report (R-markdown) text here directly. If you need more space, you can put your text in a sheet and refer to that sheet with parameter tab. The last option is to put your text in a separate file using parameter report_text_file. The value is of type ‘string’. See also parameter(s): tab, report_text_file.
  260. report_text_file: path to the Rmd-file in which you have put the custom r-markdown text for your report (with or without yaml-header). The value is of type ‘path’. Figure(s) using ‘report_text_file’: report.
  261. report_yaml_custom: add custom yaml (injected at end). The value is of type ‘string’.
  262. report_yaml_default: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-default.Rmd.
  263. report_yaml_html: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-html.Rmd.
  264. report_yaml_ioslides: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-ioslides.Rmd.
  265. report_yaml_pdf: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-pdf.Rmd.
  266. report_yaml_powerpoint: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-powerpoint.Rmd.
  267. report_yaml_toc: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-toc.Rmd.
  268. report_yaml_word: not documented yet. The value is of type ‘path’. For the default style the value is ext/snippet/yaml-word.Rmd.
  269. resolution: for png, jpg. The value is of type ‘numeric’. Unit: ‘ppi’. For the default style the value is 600. See also parameter(s): font_size, font_size_jpeg, line_distance.
  270. scale: scale your data. You may use this for example to scale fractions to percentages (scale = 100). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 100. For the default style the value is 1. For the ppower style the value is 100. Figure(s) using ‘scale’: NL’ers hebben buitenlandse obligaties, kansrijk, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen.
  271. server_1: not documented yet. The value is of type ‘string’. For the default style the value is cpb-rs-l01p.cpb.nl.
  272. server_2: not documented yet. The value is of type ‘string’. For the default style the value is cpb-rs-l02p.cpb.nl.
  273. shading_suppress_col: not documented yet. The value is of type ‘string’. For the default style the value is #ffffff88.
  274. shading_suppress_x: same as x_shading, except that it is ran after most plotting is done so you can suppress parts of plot. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_shading.
  275. shading_suppress_x_date: same as shading_suppress_x, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): shading_suppress_x. Figure(s) using ‘shading_suppress_x_date’: Eerste indruk: corona treft ouderen buitenproportioneel.
  276. style: style in which your figure will be generated. You can select multiple styles. First style has highest priority. The last one is always default; it is implicitly added if you don’t do that manually. The manual provides an overview of the different styles available. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): wide, english. For the kansrijk style the value is no-title. For the box-plot style the value is no-legend. For the world-map style the value is wide. For the world-map-www style the value is world-map. Figure(s) using ‘style’: hello-world-bar, Six different line types, Industriële productie en detailhandel, Inflatie, Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Standard normal distribution, geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, ppower, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Coloring many series in a clear and unique fashion is challenging, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, {x,y}lab{bold,italic}, trend-vs-niveau, Impact no-deal Brexit (tall), Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
  277. style_add: using this adds styles (with low prio) to your current style, instead of replacing them. The value is a list with elements of the type ‘string’ separated by ‘,’.
  278. style_histogram: not documented yet. The value is of type ‘string’. For the default style the value is for one single histogram of a vector of data..
  279. style_small: not documented yet. The value is of type ‘string’. For the default style the value is for a slightly smaller figure. This is the standard for figures in a so-called 'frame' (Dutch: 'kader')..
  280. style_world_map: not documented yet. The value is of type ‘string’. For the default style the value is for creating a map of the world..
  281. svg: export figure as svg. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): pdf, png, jpg, svg, gif, r_plot.
  282. svg_dir: destination directory for your svg’s. Use / as separator. Please note: you should put create_svg at y to produce svg’s instead of pdf’s and png’s. *Pro feature. The value is of type ‘path’. For the default style the value is .. See also parameter(s): pdf_dir.
  283. svg_file: not documented yet. The value is of type ‘path’. See also parameter(s): pdf_file, file.
  284. tab: tab name of the tab holding the data for the figure. One figure may refer to multiple tabs, in which case the data will be joined. Multiple figures may refer to the same tab to ‘get their data’, e.g. if you want to make the same figure in different languages. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): name-of-tab-1, name-of-tab-2. Figure(s) using ‘tab’: Hello World, hello-world-bar, Hello World, Werkloosheid, Six different line types, Bbp tijdens crises, Partly dashed line, Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones (Europe yellow), Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Two bandwiths in one plot, Oversterfte in 2020, Cohorten omvatten veel asielmigranten, Inflatie, Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Forecasted from 1958, Geraamd vanaf 1958, Werkverliezers, Bestaande koopwoningen, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Standard normal distribution, geo-first-example, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Phones per continent, ppower, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Coloring many series in a clear and unique fashion is challenging, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, {x,y}lab{bold,italic}, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  285. text_col: the color of the label. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): black, rose, green. For the default style the value is black. Figure(s) using ‘text_col’: Oversterfte in 2020, Industriële productie en detailhandel, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  286. text_font_size: relative font size. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0.7, 1.5. For the default style the value is 1. Figure(s) using ‘text_font_size’: Industriële productie en detailhandel.
  287. text_font_style: 1 = normal, 2 = bold, 3 = italic, 4 = bold and italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. For the default style the value is 3. Figure(s) using ‘text_font_style’: Older workers more productive?.
  288. text_label: the text label you want to show in the figure. The value is a list with elements of the type ‘string’ separated by ‘;;’. Example(s): first label;; second label. Figure(s) using ‘text_label’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  289. text_offset: distance (‘offset’) of the text label from the specified coordinate in fractions of the width of the letter ‘m’. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 0.5. Figure(s) using ‘text_offset’: Different alignment for PT.
  290. text_pos: alignment of your text label. Leave empty if you want your text centerd on the given (x,y) coordinates. Or: 1 = below, 2 = left, 3 = above, 4 = right. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1, 2, 3, 4. Figure(s) using ‘text_pos’: Oversterfte in 2020, Older workers more productive?, Rentespreads op overheidsschuld.
  291. text_rotation: the rotation of the label in degrees counterclockwise. Zero (0) means horizontal, 90 means vertical. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘text_rotation’: Industriële productie en detailhandel, Impact no-deal Brexit (horizontal).
  292. text_x: the x-position of your text label. If your x-axis is numeric, just put the value here. If you use bars, then text_x works as follows. The x-value of the first x-position is 1, i.e. where the first (set of) bars are located. The second is 2, etc. So, if you want your label inbetween the first two x-position, you should use 1.5 as a value. If your x-axis holds dates, please use text_x_date instead. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_x’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  293. text_x_date: if your x-axis consists of dates, you should use this parameter instead of text_x, to indicate what the x-postion of your text label is. Please mark the cell in Excel as a ‘date’ (i.e. not as a regular number). The value is a list with elements of the type ‘Date’ separated by ‘,’. Example(s): 2020-03-18. Figure(s) using ‘text_x_date’: Rentespreads op overheidsschuld.
  294. text_y: the y-postion of your text label. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘text_y’: Oversterfte in 2020, Industriële productie en detailhandel, Older workers more productive?, Rentespreads op overheidsschuld, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  295. time_stamp: adds time-stamp to file name. The value is of type ‘bool’. For the default style the value is n.
  296. timestamp: not documented yet. The value is of type ‘POSIXct’.
  297. title: the title of your figure. Its font size automatically scales with the length of the title if it would exceed the figure’s width. You may use backslash-n to add a newline to your title. The value is of type ‘string’. For the ppower style the value is Koopkrachtontwikkeling. Figure(s) using ‘title’: Hello World, Hello World, Werkloosheid, Six different line types, Bbp tijdens crises, Partly dashed line, Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones (Europe yellow), Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Two bandwiths in one plot, Oversterfte in 2020, Cohorten omvatten veel asielmigranten, Inflatie, Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Geraamd vanaf 1958, Werkverliezers, Bestaande koopwoningen, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Standard normal distribution, Arbeidsmarktregio’s in 2020 volgens CBS, Participatie gemeenten, World import, customs or balance of payments (prices), change in july, 2020., World trade volume change last month, World trade volume change last month:, Phones per continent, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Coloring many series in a clear and unique fashion is challenging, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, {x,y}lab{bold,italic}, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  298. title_align: alignment of title. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is left.
  299. title_col: color of title text. The value is of type ‘string’. For the default style the value is black.
  300. title_font_size: relative font size of title compared to font_size. Font sizes is scaled automatically down if your title exceeds the margin (same as title_margin_left) at the right side of the figure. The value is of type ‘numeric’. For the default style the value is 1.28571.
  301. title_v_shift: distance from top of figure. If you use a logo then the distance will be increased automatically. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.5. See also parameter(s): logo.
  302. transformation: this transformation function will be applied to each y-value individually. The value is of type ‘string’. Example(s): log, function(x) x^2. Figure(s) using ‘transformation’: Werkverliezers.
  303. type: chart type per time series. James assumes line for series that are not specified. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): area, area=, bar--, bar=, box, dot, geo, line, param, whisker. For the default style the value is line. For the fan style the value is line, area, area, area, area, area, area. For the ppower style the value is dot, line, line, line. For the histogram style the value is bar--. Figure(s) using ‘type’: report, Hello World, hello-world-bar, Hello World, Werkloosheid, Six different line types, Ontwikkeling EMU-schuld in schokscenario’s, Number of phones US vs. Europe, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones in the world, Number of phones (Europe yellow), Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Two bandwiths in one plot, Oversterfte in 2020, Cohorten omvatten veel asielmigranten, Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Forecasted from 1958, Geraamd vanaf 1958, Werkverliezers, Bestaande koopwoningen, A discontinuity, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Phones per continent, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Older workers more productive?, Overlapping labels (NL, PT), Different alignment for PT, {x,y}lab{bold,italic}, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  304. user: not documented yet. The value is of type ‘string’.
  305. vline_bold: to be implemented The value is of type ‘numeric’.
  306. vline_dash: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Figure(s) using ‘vline_dash’: Oversterfte in 2020, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  307. vline_dash_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘vline_dash_col’: Oversterfte in 2020.
  308. vline_dash_date: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): 2020-12-31. Figure(s) using ‘vline_dash_date’: Eerste indruk: corona treft ouderen buitenproportioneel, Rentespreads op overheidsschuld.
  309. vline_dash_lty: not documented yet. The value is of type ‘numeric’. For the default style the value is 3.
  310. vline_dash_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 1.
  311. warning: james puts warnings in this vector, so its easy to see which figure generated which warnings. #TODO The value is a list with elements of the type ‘string’ separated by ‘,’.
  312. whisker_col: color of whiskers. You can supply a different color for each whisker. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘whisker_col’: Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot.
  313. whisker_edge_length: not documented yet. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.0000000000000007E-2.
  314. whisker_legend_col: color of whiskers in legend. If no value specified, whiskers will take same color as in figure. The value is of type ‘string’. Figure(s) using ‘whisker_legend_col’: Two series of whiskers in one plot.
  315. whisker_legend_show_n: the number of whiskers you want to show in your legend. If different whiskers for different series have different meanings, you may want to show them all. If you don’t want to see whiskers in your legend, then set whisker_legend_show_n = 0. Please note that you can change the order of the whiskers in your data if needed. The value is of type ‘numeric’. Example(s): 0, 1, 2, …. For the default style the value is 1. Figure(s) using ‘whisker_legend_show_n’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Two series of whiskers in one plot.
  316. whisker_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.5.
  317. whisker_series: time series which this series corresponds to. The default value is set so that your first whisker definition is superimposed on the first time series (bar–), the second on the second, etc. If, for example, you have a whisker for only one of the time series, you can indicate here which time series that is. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the default style the value is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. Figure(s) using ‘whisker_series’: Verwacht verlies in verschillende scenario’s.
  318. width: width of the resulting image. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 7.5. For the small style the value is 6.8. For the kansrijk style the value is 12.5. For the big style the value is 15. For the slide style the value is 14.2. For the slide-wide style the value is 21. For the wide style the value is 15.5. For the world-map style the value is 15.5.
  319. world_map_country_border_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  320. world_map_country_border_lwd: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  321. world_map_country_no_data_col: not documented yet. The value is of type ‘string’. For the world-map style the value is gray95.
  322. world_map_legend_dot_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  323. world_map_legend_dot_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 0.5.
  324. world_map_legend_font_col: not documented yet. The value is of type ‘string’. For the world-map style the value is endeavour.
  325. world_map_legend_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.3.
  326. world_map_ocean_border_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  327. world_map_ocean_col: not documented yet. The value is of type ‘string’. For the world-map style the value is anakiwa.
  328. world_map_projection: maps are flat (2D), while the earth is a sphere (3D). Here you can choose which projection you want to use to project the 3D earth on a 2D flat. https://proj.org/operations/projections/index.html contains an overview. Please use the ‘proj-string’ below the image. See for example the default projection (‘hatano’) which we use: https://proj.org/operations/projections/hatano.html. The value is of type ‘string’. For the world-map style the value is +proj=hatano.
  329. world_map_threshold: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. For the world-map style the value is -2.0, -1.5, 0, +1.5, +2.0.
  330. world_map_threshold_legend_n_decimals: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  331. world_map_title_bg_col: not documented yet. The value is of type ‘string’. For the world-map style the value is endeavour.
  332. world_map_title_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  333. world_map_title_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 2.1.
  334. world_map_value: not documented yet. The value is of type ‘numeric’. Figure(s) using ‘world_map_value’: World trade volume change last month:.
  335. world_map_value_bg_col: not documented yet. The value is of type ‘string’.
  336. world_map_value_col: not documented yet. The value is of type ‘string’. For the world-map style the value is white.
  337. world_map_value_font_size: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 3.
  338. world_map_value_n_decimals: not documented yet. The value is of type ‘numeric’. For the world-map style the value is 1.
  339. world_map_value_symbol: not documented yet. The value is of type ‘string’. For the world-map style the value is %.
  340. x_at: position at which you want labels at the x-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_ticks, x_lab. Figure(s) using ‘x_at’: Two series of whiskers in one plot.
  341. x_axis_bold_col: color of x-axis. The value is of type ‘string’. For the default style the value is black. See also parameter(s): x_axis_bold_if_zero.
  342. x_axis_bold_if_zero: switch off the horizontal bold line if you don’t want it. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): x_axis_show.
  343. x_axis_bold_lwd: line width of x-axis. The value is of type ‘numeric’. For the default style the value is 1. See also parameter(s): x_axis_bold_if_zero.
  344. x_axis_show: show the x-axis. Set n if you want to hide x_lab and x_ticks. The grid lines (parameter y_at) are shown independently of the axis. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): x_lab, x_ticks, y_axis_show, y_at. Figure(s) using ‘x_axis_show’: Six different line types, trend-vs-niveau.
  345. x_keep: remove data outside of this range. Keep data inside range. The example removes all data below 0 and above 100. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): x_lim, y_keep. Figure(s) using ‘x_keep’: ppower.
  346. x_lab: the labels you want at the positions x_at. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): x_at, x_ticks, x_lab_bold, x_lab_italic.
  347. x_lab_as_text: if ‘y’, values at the x-axis are seen as text instead of numbers. This enables you to show equidistant bars above unequally spaced x-values (years 2000, 2009, 2010). The value is of type ‘bool’. Figure(s) using ‘x_lab_as_text’: Number of phones in the world, Number of phones in the world.
  348. x_lab_big_mark_show: for the values at the x-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is n. Figure(s) using ‘x_lab_big_mark_show’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 , Toeslagen.
  349. x_lab_bold: makes the i’th label bold. You can combine bold with italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_italic, y_lab_italic. Figure(s) using ‘x_lab_bold’: {x,y}lab{bold,italic}.
  350. x_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘x_lab_col’: Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  351. x_lab_date_show: if y, dates are shown instead of numbers (n). The value is of type ‘bool’. Figure(s) using ‘x_lab_date_show’: Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  352. x_lab_font_size: relative font size of the labels on the x-axis. The value is of type ‘numeric’. For the default style the value is 1. Figure(s) using ‘x_lab_font_size’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  353. x_lab_group_v_shift: downshift of the group-labels below the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.5.
  354. x_lab_italic: makes the i’th label italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): x_lab, x_lab_bold, y_lab_bold. Figure(s) using ‘x_lab_italic’: {x,y}lab{bold,italic}.
  355. x_lab_rotation: rotate the labels at the x-axis. Zero (0) for horizontal. 90 for vertical. The value is of type ‘numeric’. Unit: ‘degrees’. Example(s): 0, 45, 90. For the default style the value is 0. Figure(s) using ‘x_lab_rotation’: Impact no-deal Brexit (horizontal).
  356. x_lab_v_shift: downshift of the labels at the x-axis. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.15.
  357. x_lim: restrict the range of the x-axis to this limit. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 100. See also parameter(s): y_lim, x_keep, x_lim_follow_data. Figure(s) using ‘x_lim’: Ontwikkeling EMU-schuld in schokscenario’s, Oversterfte in 2020, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Groeibijdragen bestedingen, Two series of whiskers in one plot.
  358. x_lim_follow_data: if you don’t care about nice labels on the left and right side of the x-axis but if you want to zoom in to your data as much as possible, you can set this parameter to ‘y’. The value is of type ‘bool’. For the default style the value is n. See also parameter(s): x_lim, x_keep. Figure(s) using ‘x_lim_follow_data’: Six different line types, Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Geraamd vanaf 1958, Werkverliezers, Groeibijdragen bestedingen.
  359. x_n_decimals: number of digits right of decimal separator on x-axis. If you don’t provide a number, the number of digits will be automatically determined based on the values on the axis. The larger interval the values these span, the less digits shown. The value is of type ‘numeric’. Example(s): 1, 2.
  360. x_scale: scales the x-axis. The value is of type ‘numeric’. Example(s): 0.001, 100. For the default style the value is 1. For the ppower style the value is 1E-3. Figure(s) using ‘x_scale’: Decompositie gemiddelde marginale belastingdruk werknemers 2021 .
  361. x_shading: vertical shading (from, to, from, to, etc.). The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 2000, 2005, 2010, 2015. See also parameter(s): shading_suppress_x.
  362. x_shading_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is #00000022. Figure(s) using ‘x_shading_col’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
  363. x_shading_date: same as x_shading, but then with dates instead of numbers. The value is a list with elements of the type ‘string’ separated by ‘,’. See also parameter(s): x_shading. Figure(s) using ‘x_shading_date’: Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+.
  364. x_ticks: overrule the default ticks at the x-axis. Leave empty for default (x_at). NB this parameter is used only if x_ticks_date is not given. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 1990, 1995, 1997, 2000. See also parameter(s): x_ticks_date, x_ticks_lwd, x_ticks_length, x_ticks_col, x_ticks_vshift. Figure(s) using ‘x_ticks’: VWO, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  365. x_ticks_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  366. x_ticks_date: choose one or two if you want ticks at these places. Beware, the default ticks will not be shown now (set x_ticks_show = y if you want them too). The value is a list with elements of the type ‘string’ separated by ‘,’. Unit: ‘unit of time’. Example(s): years, quarters, months, weeks, days. See also parameter(s): x_ticks. Figure(s) using ‘x_ticks_date’: Groeibijdragen bestedingen, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  367. x_ticks_length: not documented yet. The value is of type ‘numeric’. Example(s): -1.4999999999999999E-2. For the default style the value is -2.5000000000000001E-2. For the no-legend style the value is -0.02.
  368. x_ticks_length_date: not documented yet. The value is of type ‘numeric’. For the default style the value is -0.03.
  369. x_ticks_lwd: not documented yet. The value is of type ‘numeric’. For the default style the value is 0.25.
  370. x_ticks_vshift: vertical shift of the x-axis. Positive means shift downwards. The value is of type ‘numeric’. Unit: ‘line’. Example(s): -0.5. For the default style the value is 0.
  371. x_title_align: not documented yet. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is right. Figure(s) using ‘x_title_align’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  372. x_title_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  373. x_title_font_size: relative font size of x-axis title/label. The value is of type ‘numeric’. For the default style the value is 1.
  374. x_title_v_shift: distance below margin_south. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.6. Figure(s) using ‘x_title_v_shift’: Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa.
  375. x_top_lab_col: not documented yet. The value is of type ‘string’. For the default style the value is black.
  376. y_at: position at which you want labels and gridlines at the y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Example(s): 0, 20, 40, 60, 80, 100. Figure(s) using ‘y_at’: ppower, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, {x,y}lab{bold,italic}, Impact no-deal Brexit (horizontal).
  377. y_axis: indicates for each of the respective time series whether they are projected on the left (l) y-axis or on the right (r) y-axis. If one or more series are on the right axis, style ‘y-right’ or ‘x-top’ (if ‘turn = y’) are automatically added as a style. The value is a list with elements of the type ‘string’ separated by ‘,’. Example(s): l, l, l, r, r. For the default style the value is l. See also parameter(s): style, turn. Figure(s) using ‘y_axis’: Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  378. y_axis_show: use n if you want to hide y_lab. Contrary to the x-axis, the y-axis does not have ticks. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): y_lab, x_axis_show. Figure(s) using ‘y_axis_show’: trend-vs-niveau.
  379. y_force_include_zero: expand y_lim so zero is in range. The value is of type ‘bool’. For the default style the value is n.
  380. y_keep: not documented yet. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_keep, y_lim. Figure(s) using ‘y_keep’: ppower.
  381. y_lab: the labels you want at the positions y_at at your left y-axis. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab_col, y_r_lab. Figure(s) using ‘y_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  382. y_lab_big_mark_show: for the values at the y-axis, use y if you want a character between every three digits left of the decimal separator. The value is of type ‘bool’. For the default style the value is y.
  383. y_lab_bold: makes the i’th label bold. You can combine bold with italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_italic, y_lab_italic. Figure(s) using ‘y_lab_bold’: {x,y}lab{bold,italic}.
  384. y_lab_col: color of labels at left y-axis. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. See also parameter(s): y_lab. Figure(s) using ‘y_lab_col’: Impact no-deal Brexit (horizontal).
  385. y_lab_font_size: relative font size of the labels on the y-axis. The value is of type ‘numeric’. For the default style the value is 1.
  386. y_lab_italic: makes the i’th label italic. The value is a list with elements of the type ‘numeric’ separated by ‘,’. Unit: ‘index’. See also parameter(s): y_lab, x_lab_bold, y_lab_bold. Figure(s) using ‘y_lab_italic’: {x,y}lab{bold,italic}.
  387. y_lab_margin_right: margin between y_lab and plotting area. The value is of type ‘numeric’. Unit: ‘fraction of width’. For the default style the value is 1.4999999999999999E-2.
  388. y_lim: same as x_lim, but for left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): x_lim, y_keep, y_r_lim. Figure(s) using ‘y_lim’: A discontinuity.
  389. y_n_decimals: number of digits right of decimal separator on y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_r_n_decimals, x_n_decimals.
  390. y_r_lab: the labels you want at the right y-axis. Please leave empty to let James find proper values. The value is a list with elements of the type ‘string’ separated by ‘;’. See also parameter(s): y_lab, y_r_lab_col, y_r_n_decimals. Figure(s) using ‘y_r_lab’: Six different line types, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall).
  391. y_r_lab_col: not documented yet. The value is a list with elements of the type ‘string’ separated by ‘,’. For the default style the value is black. Figure(s) using ‘y_r_lab_col’: Impact no-deal Brexit (tall).
  392. y_r_lim: set limit of right y-axis (see y_lim). Please note that, based on the given y_r_lim range, James tries to find ‘nice values’ for the right y-axis, where the number of values equals the number of gridlines as given by the left y-axis. The value is a list with elements of the type ‘numeric’ separated by ‘,’. See also parameter(s): y_lim, y_r_n_decimals. Figure(s) using ‘y_r_lim’: The use of y_r_lim.
  393. y_r_n_decimals: number of digits right of decimal separator on right y-axis. The value is of type ‘numeric’. Example(s): 1, 2. See also parameter(s): y_n_decimals, x_n_decimals.
  394. y_r_scale_auto: lets James find scale the right y-axis so that (i) the number of values on the right y-axis is equal to the number of gridlines as set by the left y-axis, and (ii) the values on the right y-axis are ‘pretty’. The value is of type ‘bool’. For the default style the value is y. See also parameter(s): y_r_n_decimals. Figure(s) using ‘y_r_scale_auto’: No auto-scaling.
  395. y_r_title_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘y_r_title_col’: Impact no-deal Brexit (tall).
  396. y_title: title/label at the y-axis. The value is of type ‘string’. Example(s): Price (euro). For the ppower style the value is verandering koopkracht (%). Figure(s) using ‘y_title’: Hello World, hello-world-bar, Hello World, Werkloosheid, Bbp tijdens crises, Partly dashed line, Ontwikkeling EMU-schuld in schokscenario’s, Industriële productie en detailhandel, NL’ers hebben buitenlandse obligaties, Oversterfte in 2020, Cohorten omvatten veel asielmigranten, Inflatie, Inkomenseffecten plannen socialezekerheids- en belastingstelsel, Kans om in risicogroep te zitten, kansrijk, Bestaande koopwoningen, Eerste indruk: corona treft ouderen buitenproportioneel, Tweede indruk coronadoden: relatief geen verschil 65-80 en 80+, Werkverliezers, Bestaande koopwoningen, Europese steunpakketten, Decompositie gemiddelde marginale belastingdruk werknemers 2021 , VWO, VWO, VWO, Investeringen in Nederland¹ door de zwaarst- getroffen eurolanden in 2018 en vice versa, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Standard normal distribution, Phones per continent, Verlies van banken na afschrijving 20% van de overheidsschuld van GIIPS-landen, Violent crime rates in the USA, Industriële productie en detailhandel, Older workers more productive?, Toeslagen, Rentespreads op overheidsschuld, Overlapping labels (NL, PT), Different alignment for PT, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, Groeibijdragen bestedingen, trend-vs-niveau, Impact no-deal Brexit (horizontal), Impact no-deal Brexit (tall), VMBO, Verwacht verlies in verschillende scenario’s, Two series of whiskers in one plot, Verwacht verlies in verschillende scenario’s, Economische groei in Nederland, No auto-scaling, The use of y_r_lim.
  397. y_title_align: not documented yet. The value is of type ‘string’. Example(s): left, center, right. For the default style the value is left. For the x-top style the value is right.
  398. y_title_col: not documented yet. The value is of type ‘string’. For the default style the value is black. Figure(s) using ‘y_title_col’: Impact no-deal Brexit (horizontal).
  399. y_title_font_size: relative font size of y-axis title/label. The value is of type ‘numeric’. For the default style the value is 1.
  400. y_title_v_shift: distance above margin_north. The value is of type ‘numeric’. Unit: ‘cm’. For the default style the value is 0.35. For the box-plot style the value is 0.3.